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].

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

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.0.0.tar.gz (4.6 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.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_ini_includer-1.0.0.tar.gz.

File metadata

  • Download URL: mkdocs_ini_includer-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 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.0.0.tar.gz
Algorithm Hash digest
SHA256 2be0fa3bd937a71180de6cbe9a29614a917975518bb779ffd48cc52a4fee15cc
MD5 c6ca15394239858ce6b257a24bb8ad40
BLAKE2b-256 6ceda2b01eb63ef78fae6b2797405d9c79053a40d3894d989d4592213e5d3684

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_ini_includer-1.0.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.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_ini_includer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63f95b3b6be5f12e66b605b9ba3d98a43f36f7e3858dcece1cf492c716b5a8c2
MD5 5703baf3e56b44a59c728ed9af233372
BLAKE2b-256 f198f31f7376f58b5d49346bddec89da29a6e0ef5ec9af9e6bc6ab1580028d18

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_ini_includer-1.0.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