A MkDocs plugin to include INI file content in documentation
Project description
MkDocs INI Includer
This is a MkDocs plugin that allows a MkDocs site to include all or part of an INI file inside the docs at build time.
Why?
- Documenting the configuration system of an app without having to copy/paste config sections
- Showing the configuration for a specific feature
Features
- ✅ Include whole INI files
- ✅ Include specific sections (e.g.,
[section.name]and all sub-data) - ✅ Preserve comments (useful docs for users)
- ✅ Support array keys like
key1[] = abc, key1[] = def - ✅ Simple embedding without complex parsing
Installation
pip install mkdocs-ini-includer
Configuration
Add the plugin to your mkdocs.yml:
plugins:
- ini-includer:
base_path: "path/to/your/ini/files" # Optional: base path for INI files
config_file: "app.ini" # Optional: default INI file
Usage
Include Entire INI File
{% ini-include %}
Or specify a specific file:
{% ini-include file="config/app.ini" %}
Include Specific Section
{% ini-include section="database" %}
Examples
Given an INI file config/app.ini:
# Application configuration
[app]
name = MyApp
version = 1.0.0
# Database settings
[database]
host = localhost
port = 5432
# Connection pool settings
pool_size = 10
[database.ssl]
enabled = true
cert_path = /path/to/cert
Include entire file:
{% ini-include %}
Include only database section:
{% ini-include section="database" %}
This will include the [database] section and all its subsections like [database.ssl].
Development & Live Reload
The plugin supports live reload during development. When using mkdocs serve, changes to INI files are automatically detected and trigger page rebuilds, allowing you to see updates immediately without restarting the development server.
Notes
- File paths are relative to your
docs_dirunlessbase_pathis configured - Comments and formatting are preserved
- Array keys (like
key[]=value) are supported - Error handling displays helpful messages in the generated docs
- Live reload works with
mkdocs servefor real-time INI file updates
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_ini_includer-1.1.0.tar.gz.
File metadata
- Download URL: mkdocs_ini_includer-1.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff276e7cecb271a84550d3518c30afd6d1dde6b8133b3856d3763063537b4ddd
|
|
| MD5 |
477fac66363aa6a8b7833ba2ce7b5ade
|
|
| BLAKE2b-256 |
e03c3599dabc7569f39f4500c68ccf1fe07fa33c26660df851498844de9b86f9
|
Provenance
The following attestation bundles were made for mkdocs_ini_includer-1.1.0.tar.gz:
Publisher:
publish.yml on beekeeper-studio/mkdocs-ini-includer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_ini_includer-1.1.0.tar.gz -
Subject digest:
ff276e7cecb271a84550d3518c30afd6d1dde6b8133b3856d3763063537b4ddd - Sigstore transparency entry: 244978065
- Sigstore integration time:
-
Permalink:
beekeeper-studio/mkdocs-ini-includer@9d6df3f984d5bb7162e2e07d36cdf8217a74d6f8 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/beekeeper-studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9d6df3f984d5bb7162e2e07d36cdf8217a74d6f8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_ini_includer-1.1.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_ini_includer-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3646b0d5ada6f65aa381be1be6bda618097c5cf01b66543fbe02c538a62e3af
|
|
| MD5 |
f803786e744d5e83f6f750b9ed6c66f0
|
|
| BLAKE2b-256 |
335fa523f2e2c313c9595de7da2b239cc1e04dee7547c5d8e01e1dcee6993442
|
Provenance
The following attestation bundles were made for mkdocs_ini_includer-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on beekeeper-studio/mkdocs-ini-includer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_ini_includer-1.1.0-py3-none-any.whl -
Subject digest:
c3646b0d5ada6f65aa381be1be6bda618097c5cf01b66543fbe02c538a62e3af - Sigstore transparency entry: 244978074
- Sigstore integration time:
-
Permalink:
beekeeper-studio/mkdocs-ini-includer@9d6df3f984d5bb7162e2e07d36cdf8217a74d6f8 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/beekeeper-studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9d6df3f984d5bb7162e2e07d36cdf8217a74d6f8 -
Trigger Event:
push
-
Statement type: