includes jinja templates in a documentation
Project description
sphinx-jinja
============
A sphinx extension to include jinja based templates based documentation into a sphinx doc
Usage
=====
In your rst doc, you can use the following snippet to use a jinja template to generate your doc
.. code:: rst
.. jinja:: first_ctx
{% for k, v in topics.items() %}
{{k}}
~~~~~
{{v}}
{% endfor %}
In your sphinx ``conf.py`` file, you can create or load the contexts needed for your jinja templates
::
extensions = ['sphinxcontrib.jinja']
jinja_contexts = {
'first_ctx': {'topics': {'a': 'b', 'c': 'd'}}
}
Each element of the `jinja_contexts` dictionary is a context dict for use in your jinja templates
============
A sphinx extension to include jinja based templates based documentation into a sphinx doc
Usage
=====
In your rst doc, you can use the following snippet to use a jinja template to generate your doc
.. code:: rst
.. jinja:: first_ctx
{% for k, v in topics.items() %}
{{k}}
~~~~~
{{v}}
{% endfor %}
In your sphinx ``conf.py`` file, you can create or load the contexts needed for your jinja templates
::
extensions = ['sphinxcontrib.jinja']
jinja_contexts = {
'first_ctx': {'topics': {'a': 'b', 'c': 'd'}}
}
Each element of the `jinja_contexts` dictionary is a context dict for use in your jinja templates
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.
See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for sphinx_jinja-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb59ce71bed330b248fccce877011ade1b660ca2a0a0e088e18d2bf07d1d51bc |
|
MD5 | 52afa139116ddf80b773ac8c75cc68a7 |
|
BLAKE2b-256 | 4045d732c55f6074a6834ad4f77fb49a6dc04859296658dc961a19297d70a39b |