MkDocs plugin to programmatically generate documentation pages during the build
Project Links
Meta
Author: Oleh Prypin
Requires Python: >=3.7
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Console
- Web Environment
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
Topic
- Documentation
- Software Development :: Documentation
- Text Processing :: Markup :: Markdown
Typing
- Typed
mkdocs-gen-files
Plugin for MkDocs to programmatically generate documentation pages during the build
pip install mkdocs-gen-files
Continue to the documentation site.
Usage
Activate the plugin in mkdocs.yml (scripts
is a required list of Python scripts to execute, always relative to mkdocs.yml):
plugins:
- search
- gen-files:
scripts:
- gen_pages.py # or any other name or path
Then create such a script gen_pages.py (this is relative to the root, not to the docs directory).
import mkdocs_gen_files
with mkdocs_gen_files.open("foo.md", "w") as f:
print("Hello, world!", file=f)
This added a programmatically generated page to our site. That is, the document doesn't actually appear in our source files, it only virtually becomes part of the site to be built by MkDocs.
Continue to the documentation site.
Apr 27, 2023
0.5.0
Aug 22, 2022
0.4.0
Jul 05, 2022
0.3.5
Jan 21, 2022
0.3.4
Jun 01, 2021
0.3.3
Apr 30, 2021
0.3.2
Feb 28, 2021
0.3.1
Feb 23, 2021
0.3.0
Jan 31, 2021
0.2.0
Jan 25, 2021
0.1.1
Dec 10, 2020
0.1.0
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
(>=1.0.3)
mkdocs