Closed pburdine closed 7 years ago
thanks for you PR. this looks like a good addition.
Can you fix those flake8 errors?
you can just use pip install tox and then run tox.
You should then reproduce the issues found by travis: https://travis-ci.org/tardyp/sphinx-jinja/builds/147203677
Fixed, tests pass now and I removed the debug print statement.
+1 Can you merge it?
Changes: 1) Added debug option because it can be very difficult to figure out why things aren't working 2) Created an Jinja Environment so macros and other files can be included. Where possible, Jinja will load the template with it's loader. This works with content and the :file: option 3) Added config option 'jinja_base' as the base for the file loader so relative or absolute paths can be used to load files from within Jinja. Defaults to same directory as conf.py
Note that in the docs I deal with, everything is contained in the 'source' directory, which doesn't work in the original code when using :file:. I am pretty sure that the debug option will fail if :file: and :debug: is used together and the document files aren't in "source". Not sure how to fix that yet.