refactor file scanning in index to remove god-function, add parent jinja extension and related docs