tardyp / sphinx-jinja

MIT License
28 stars 22 forks source link

Support `.. include::` in template. #7

Closed anntzer closed 6 years ago

anntzer commented 6 years ago

Supporting the include directive from with jinja requires passing source = '' to the ViewList constructor (for reasons admittedly not totally clear to me).

Supporting including contents that include titles requires, well, the use of sphinx.util.nested_parse_with_titles instead of nested_parse.

See https://groups.google.com/forum/#!topic/sphinx-dev/l4fHrIJfwq4 and http://www.sphinx-doc.org/en/1.7/extdev/markupapi.html#parsing-directive-content-as-rest

anntzer commented 6 years ago

@tardyp Can you have a look at this PR and #8? (I have a few more patches on my queue...) Thanks. If you need help maintaining the package I am happy to do so as well.