mkdocs-llmstxt-md
MkDocs plugin for LLM-friendly documentation that provides:
- Direct markdown serving - Access original markdown at
page.mdURLs - llms.txt generation - Concise index file for LLM context
- llms-full.txt generation - Complete documentation in single file
- Copy-to-markdown button - Easy copying of source markdown
Features
- 🚀 Source-first approach - Works with original markdown, no HTML parsing
- 🤖 LLM optimized - Token-efficient formats for AI consumption
- 📋 Copy button - One-click markdown copying for developers
- 🔗 Dual URLs - Both human-readable HTML and LLM-friendly markdown
This plugin is inspired by mkdocs-llmstxt, the key difference is that mkdocs-llmstxt take the parsing HTML approach which can be used with injected HTML. This plugin focus on the raw markdown approach, which makes things simpler if you only need to work with markdown content.
Installation
uv pip install mkdocs-llmstxt-md
# or with pip
pip install mkdocs-llmstxt-md
Usage
Add to your mkdocs.yml. At its simplest, no configuration is needed — sections are derived from your nav:
plugins:
- llmstxt-md
To customize titles, descriptions, or grouping for specific pages, add sections — once you provide any sections, only the pages you list are included and nav is no longer consulted:
plugins:
- llmstxt-md:
sections:
"Getting Started":
- index.md: "Introduction to the project"
- quickstart.md
Configuration
sections: Optional dict of section names to file patterns. Leave it empty/omitted to automatically mirror yournavstructure (a navSectionbecomes a heading; a top-level page not inside any section becomes its own heading, named after the page). Provide it to take full manual control over titles/grouping/descriptions — when non-empty, only the pages you list are included andnavis ignored.enable_markdown_urls: Enable .md URL serving (default: true)enable_llms_txt: Generate llms.txt (default: true)enable_llms_full: Generate llms-full.txt (default: true)enable_copy_button: Add copy button to pages (default: true)
Developer Setup
Prerequisites
- Python 3.8+
- uv (recommended) or pip
Installation for Development
-
Clone the repository:
git clone <repository-url> cd mkdocs-llmstxt-md
-
Install in development mode:
uv pip install -e . # or with pip pip install -e .
-
Verify installation:
uv pip list | grep mkdocs-llmstxt-md # or with pip pip list | grep mkdocs-llmstxt-md
Testing with the Test Site
The project includes a complete test site in test-site/ to validate all plugin features:
-
Build the test site:
cd test-site mkdocs build
-
Serve the test site locally:
mkdocs serveVisit http://localhost:8000 to see the documentation
-
Validate generated files: After building, check the
test-site/site/directory for:llms.txt- Index file with markdown URLsllms-full.txt- Complete documentation*.mdfiles alongside HTML pages (e.g.,index.md,quickstart/index.md)- Copy button on each page (top-right corner)
-
Test markdown URL access:
- Visit http://localhost:8000/index.md to see raw markdown
- Visit http://localhost:8000/quickstart/index.md for quickstart markdown
- Compare with HTML versions at http://localhost:8000/ and http://localhost:8000/quickstart/
Test Site Structure
The test site demonstrates all plugin features:
test-site/
├── mkdocs.yml # Plugin configuration example
└── docs/
├── index.md # Homepage with tables and code
├── quickstart.md # Getting started guide
├── installation.md # Detailed setup instructions
├── api/
│ ├── overview.md # API documentation
│ └── functions.md# Function reference
└── advanced/
└── configuration.md # Advanced config examples
Running Tests
Currently manual testing via the test site. Future versions will include automated tests.
Making Changes
- Modify code in
src/mkdocs_llmstxt_md/ - Test changes:
cd test-site && mkdocs build - Validate all features work as expected
- Check generated files in
test-site/site/
Metadata
Release files for mkdocs-llmstxt-md 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs_llmstxt_md-0.3.0.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_llmstxt_md-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / mkdocs_llmstxt_md-0.3.0.tar.gz
| Download URL | mkdocs_llmstxt_md-0.3.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3efcc267e0bffe9ec7767bfbf5d67bc64b177dd85bee75af6b72d83dd7975910
|
|
BLAKE2b-256 checksum How to use checksums |
6c2236650e5cc0a9d13817924299d1d04357f2451fb60c835ee9f5cfaae17bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / mkdocs_llmstxt_md-0.3.0-py3-none-any.whl
| Download URL | mkdocs_llmstxt_md-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c39141ce51ea6b5516dadda7778226695661c644506e231bfc0b6e6d664ab57c
|
|
BLAKE2b-256 checksum How to use checksums |
d54195af11caa5acf53eb6aa199ec316c4ee02fe362f279c149b81d3200b557a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency log