--- id: mkdocs-gen-files version: "0.6.1" license: MIT license_treatment: permissive maintenance: active --- # mkdocs-gen-files — MkDocs plugin to programmatically generate documentation pages during the build License: permissive · Maintenance: active · Downloads: 1.5M/mo ## What it is and what it does mkdocs-gen-files is a MkDocs plugin that lets you generate documentation pages on the fly during the build process. Instead of manually creating every markdown file, you write a Python script that runs at build time and creates pages programmatically. This is useful when your documentation structure is repetitive, data-driven, or needs to be generated from code, APIs, or other sources. The plugin works by executing Python scripts you specify in your mkdocs.yml configuration. These scripts use the plugin's API to create markdown files that become part of your site without needing to exist in your source repository. It depends on mkdocs and properdocs, and requires Python 3.9 or later. The plugin is production-stable, actively maintained, and has no known security vulnerabilities. Use it for: - Generate API reference documentation from code introspection or OpenAPI specs automatically. - Create index pages or table-of-contents pages that aggregate content from multiple sources. - Build documentation for large projects where page structure mirrors code structure or database schemas. - Dynamically generate changelog or release notes pages from version control or issue tracking data. - Create multi-language or multi-variant documentation from a single source template. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. MkDocs plugin that generates documentation pages programmatically during the build process by executing Python scripts to create content dynamically. Yes. The plugin is production-stable (Development Status 5), actively maintained with recent commits, has no security vulnerabilities, and carries a permissive MIT license. Install friction is low. It solves a real problem—automating repetitive documentation generation—and integrates cleanly into the MkDocs build pipeline. Suitable for projects where documentation structure is data-driven or code-generated. ## Install pip install mkdocs-gen-files uv add mkdocs-gen-files poetry add mkdocs-gen-files ## Installing mkdocs-gen-files Before you install: Low friction installation as a pure Python wheel. Actively maintained with recent commits and a stable release cadence; last commit 2026-04-17 and latest release 2026-03-16 indicate ongoing support. License in practice: MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—only requiring attribution. Quickstart: pip install mkdocs-gen-files # In mkdocs.yml: plugins: - gen-files: scripts: - gen_pages.py # In gen_pages.py: import mkdocs_gen_files with mkdocs_gen_files.open("foo.md", "w") as f: print("Hello, world!", file=f) Requires MkDocs to be installed and configured; scripts must be valid Python and located relative to mkdocs.yml. Verify before relying: - Whether the plugin supports conditional page generation or filtering based on build parameters. - Performance characteristics when generating large numbers of pages in a single build. - Compatibility with other MkDocs plugins that also modify the site structure. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mkdocs dynamic page generation, mkdocs plugin programmatic docs, generate documentation pages build time, mkdocs automated content creation, mkdocs build script integration, dynamic markdown generation mkdocs, mkdocs-plugin, code-generation [View on SkillFed](https://skillfed.io/packages/mkdocs-gen-files) · [View on PyPI](https://pypi.org/project/mkdocs-gen-files/)