Skip to main content

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_dir unless base_path is 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 serve for real-time INI file updates

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

mkdocs_ini_includer-1.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_ini_includer-1.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

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

Hashes for mkdocs_ini_includer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ff276e7cecb271a84550d3518c30afd6d1dde6b8133b3856d3763063537b4ddd
MD5 477fac66363aa6a8b7833ba2ce7b5ade
BLAKE2b-256 e03c3599dabc7569f39f4500c68ccf1fe07fa33c26660df851498844de9b86f9

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_ini_includer-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_ini_includer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3646b0d5ada6f65aa381be1be6bda618097c5cf01b66543fbe02c538a62e3af
MD5 f803786e744d5e83f6f750b9ed6c66f0
BLAKE2b-256 335fa523f2e2c313c9595de7da2b239cc1e04dee7547c5d8e01e1dcee6993442

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page