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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 154d9f0cefcf7868e132a2fcafc7d1f5f1c62d1b8c03e5e55876feead9105968 |
|
MD5 | b19a5a297366dc3943f2b2f5661d77ca |
|
BLAKE2b-256 | 7aba2f38350360fbafa32880fc6a20e5f8fa53547b196b911ab6b8513b2d5435 |
Close
Hashes for mkdocs_pages_j2_plugin-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdbb3b1616e2d0fdcce3fb16307f723a61ec849b79ec6ae0a9a7846ae8dc670 |
|
MD5 | 5e2c88a9660131af2d6083bdf242998a |
|
BLAKE2b-256 | cdc0f14e87cb81643c0773286a93883e1a7b8e4b72180c451d9b0ee30f3f8726 |