This is a plugin for mkdocs to render jinja templates in markdown documents.
Template files must be in templates/
in the root directory of your
mkdocs project.
An example template file might look like this:
<ul>
{% for item in items %}
<li>{{ item }}</li>
{% endfor %}
</ul>
Then in any of the pages of your mkdocs project use the following syntax to include a template and provide the variables.
{%
template "template.html" # filename of the template in templates/ directory
items:
- item 1
- item 2
- item 3
%}
This will generate the following result:
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>