Skip to main content

MkDocs plugin to generate /llms.txt files for LLM-friendly documentation

Project description

mkdocs-llms-source

CI Docs PyPI Python License

MkDocs plugin to generate /llms.txt files for LLM-friendly documentation.

What It Does

Generates three outputs from your MkDocs site:

  1. /llms.txt — A curated index following the llmstxt.org spec with links to per-page markdown files
  2. /llms-full.txt — All documentation concatenated into a single file (for stuffing into LLM context windows)
  3. Per-page .md files — 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

mkdocs_llms_source-1.1.0.tar.gz (70.5 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_llms_source-1.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for mkdocs_llms_source-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2c6e00d8771ba922634e87af7e74e60aef332b53570fa5f747ad764ccef4107c
MD5 ac10f613015feae76e77d9d7e1776ccd
BLAKE2b-256 cc699f032201d9a97e6f38401b9696d736bbfcc1e51b18d1d7cc9a79193d0f3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_llms_source-1.1.0.tar.gz:

Publisher: publish.yml on TimChild/mkdocs-llms-source

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_llms_source-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_llms_source-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 997b54e790b9e8e9e6c8efa933da912c3ba637cc0a37b8af3472b024eb5f3f1c
MD5 be96472f1bd21e7c51a61dac4911b25f
BLAKE2b-256 007947ab9325a6e293749cae94544e800c112077cdbd80ea242e638caa5741e4

See more details on using hashes here.

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

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