MkDocs plugin to generate /llms.txt files for LLM-friendly documentation
Project description
mkdocs-llms-source
MkDocs plugin to generate /llms.txt files for LLM-friendly documentation.
What It Does
Generates three outputs from your MkDocs site:
/llms.txt— A curated index following the llmstxt.org spec with links to per-page markdown files/llms-full.txt— All documentation concatenated into a single file (for stuffing into LLM context windows)- Per-page
.mdfiles — Raw markdown accessible at the same URL path as HTML pages
Install
uv add mkdocs-llms-source
Usage
Add to your mkdocs.yml:
site_name: My Project
site_url: https://docs.example.com
site_description: Documentation for My Project
plugins:
- search
- llms-source
Build your site:
mkdocs build
The plugin auto-derives the llms.txt section structure from your MkDocs nav — zero extra configuration needed.
Configuration
plugins:
- llms-source:
full_output: true # Generate llms-full.txt (default: true)
markdown_urls: true # Copy .md source files to output (default: true)
description: "Override description for llms.txt header"
How It Works
Source-first approach: The plugin uses your original markdown source files directly — no HTML-to-Markdown conversion. This is simpler, more reliable, and preserves your intended formatting.
The llms.txt sections are automatically derived from your MkDocs nav configuration, so top-level nav items become H2 sections in the output.
Example Output
Given this nav:
nav:
- Home: index.md
- Guides:
- Getting Started: guides/setup.md
The generated /llms.txt:
# My Project
> Documentation for My Project
## Home
- [My Project](https://docs.example.com/index.md)
## Guides
- [Getting Started](https://docs.example.com/guides/setup.md)
License
MIT
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
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_llms_source-1.1.0.tar.gz.
File metadata
- Download URL: mkdocs_llms_source-1.1.0.tar.gz
- Upload date:
- Size: 70.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6e00d8771ba922634e87af7e74e60aef332b53570fa5f747ad764ccef4107c
|
|
| MD5 |
ac10f613015feae76e77d9d7e1776ccd
|
|
| BLAKE2b-256 |
cc699f032201d9a97e6f38401b9696d736bbfcc1e51b18d1d7cc9a79193d0f3d
|
Provenance
The following attestation bundles were made for mkdocs_llms_source-1.1.0.tar.gz:
Publisher:
publish.yml on TimChild/mkdocs-llms-source
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_llms_source-1.1.0.tar.gz -
Subject digest:
2c6e00d8771ba922634e87af7e74e60aef332b53570fa5f747ad764ccef4107c - Sigstore transparency entry: 1166732026
- Sigstore integration time:
-
Permalink:
TimChild/mkdocs-llms-source@7ccf0c19dd14732942eb43df1120600aa3120a14 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/TimChild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ccf0c19dd14732942eb43df1120600aa3120a14 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mkdocs_llms_source-1.1.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_llms_source-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
997b54e790b9e8e9e6c8efa933da912c3ba637cc0a37b8af3472b024eb5f3f1c
|
|
| MD5 |
be96472f1bd21e7c51a61dac4911b25f
|
|
| BLAKE2b-256 |
007947ab9325a6e293749cae94544e800c112077cdbd80ea242e638caa5741e4
|
Provenance
The following attestation bundles were made for mkdocs_llms_source-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on TimChild/mkdocs-llms-source
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_llms_source-1.1.0-py3-none-any.whl -
Subject digest:
997b54e790b9e8e9e6c8efa933da912c3ba637cc0a37b8af3472b024eb5f3f1c - Sigstore transparency entry: 1166732074
- Sigstore integration time:
-
Permalink:
TimChild/mkdocs-llms-source@7ccf0c19dd14732942eb43df1120600aa3120a14 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/TimChild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ccf0c19dd14732942eb43df1120600aa3120a14 -
Trigger Event:
release
-
Statement type: