Skip to content

fiinnnn/mkdocs-mktemplate-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mktemplate

This is a plugin for mkdocs to render jinja templates in markdown documents.

Usage

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>

Packages used

About

Insert jinja templates in mkdocs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages