An MkDocs plugin to generate '.pages' from 'pages.j2'
Project description
mkdocs-pages-j2-plugin
This plugin builds .pages
files from .pages.j2
files, using Jinja2 to render the templates.
This plugin is particularly useful when used together with the
mkdocs-awesome-pages-plugin.
Installation
Install the package with pip:
pip install mkdocs-pages-j2-plugin
Activate the plugin in mkdocs.yml
:
plugins:
- search
- pages-j2
- awesome-pages
Usage
Example of a .pages.j2
file:
title: Page Title
nav:
- Welcome: index.md
{%- for i in range(1,3) %}
- My Page {{ i }}: p{{ i }}.md
{%- endfor %}
The plugin will render the Jinja2 template above and create a .pages
file with the following content:
title: Page Title
nav:
- Welcome: index.md
- My Page 1: p1.md
- My Page 2: p2.md
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
Built Distribution
Close
Hashes for mkdocs_pages_j2_plugin-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2112fae1742329043f849f0f7794fe6bd732092b177152665e9f0f46ea1d52b7 |
|
MD5 | 6be249d0aa285f011305291a2661f2f5 |
|
BLAKE2b-256 | 85b82badc019350891562ec10a01da3aae4897bf1a3ad653a5e0a56ace4ae3fd |
Close
Hashes for mkdocs_pages_j2_plugin-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653c32adcdcf78d40a02b353d82cf0019b558fd10211ce1f9a56f69801d1638a |
|
MD5 | 599cc090896b66271ad013dc584468ae |
|
BLAKE2b-256 | ecd107c7ab3ee4d7215f4b42c0794b790d63c306d7fd02e2bb6db9009b2d391c |