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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d925b8eb207c3328cace98c8ec3ef72e6ddece1efa1a7125e7edf207f17ba6 |
|
MD5 | 9ce1b42d8d86a714450a829bc2ae0e44 |
|
BLAKE2b-256 | 99c329675ded262c2562c7e2ec57f909d99465bf63b9ad72247f4508967a9638 |
Close
Hashes for mkdocs_pages_j2_plugin-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dfc8cede7875140ebe552372c67a3ce0d4d388e9f1400b438f4834418cd3bd5 |
|
MD5 | 6f709b33b4c2ee614e93192830066750 |
|
BLAKE2b-256 | 3634c3f56e4438e4cf7398855c0613e56b6bb8ca2a88d57430dedbc77eaae6d8 |