MkDocs plugin to programmatically generate documentation pages during the build
Project description
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):
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.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file mkdocs-gen-files-0.3.5.tar.gz
.
File metadata
- Download URL: mkdocs-gen-files-0.3.5.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.7-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d90d9e1676531a0bb96b1287dc28aa41162986de4dc3c00400214724761ff6ef |
|
MD5 | 0e9bffda962c714109d84a7cd31366d1 |
|
BLAKE2b-256 | 81c3e07cc5889e980f631702f60329000532711a2136973ae7264c7972e18d1a |
Provenance
File details
Details for the file mkdocs_gen_files-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_gen_files-0.3.5-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.7-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69562fddc662482e8f54a00a8b4ede5166ad5384ae4dbb0469f1f338ef3285ca |
|
MD5 | 9ad8786bd04b5fa05a820f7104106f78 |
|
BLAKE2b-256 | 967827175220060cf9f141b32f8eacb9adb1a9290e9f524417b3c47bc135f423 |