tardyp / sphinx-jinja

MIT License
28 stars 22 forks source link

Extended jinja.py to make it more useful #2

Closed pburdine closed 7 years ago

pburdine commented 8 years ago

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.

tardyp commented 8 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

pburdine commented 8 years ago

Fixed, tests pass now and I removed the debug print statement.

FlxPeters commented 7 years ago

+1 Can you merge it?