Skip to main content

mkdocs plugin to insert jinja templates on any page

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-mktemplate-plugin-1.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

mkdocs_mktemplate_plugin-1.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-mktemplate-plugin-1.0.1.tar.gz.

File metadata

  • Download URL: mkdocs-mktemplate-plugin-1.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for mkdocs-mktemplate-plugin-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4a78531416a94d510025d0109aef4a24cd19e07450d70dd15308c28904f4a980
MD5 47d49c69d11109f70ca70a9e5cb96172
BLAKE2b-256 e9fc491b217f80f812de8a7d26290721a660160c693468ae1087d6cb9163655a

See more details on using hashes here.

File details

Details for the file mkdocs_mktemplate_plugin-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_mktemplate_plugin-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for mkdocs_mktemplate_plugin-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c9aa80b63da7a927ef402a0c99024d6221ccc841d60333af63d15b63039ffdd
MD5 463f219b4ba1ecf462a3742019a066c2
BLAKE2b-256 66c74d8059023df37aa19575312764821d1333a2bf873f7a53ade103508c1a8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page