Development¶
Setup¶
Clone the repository and install in development mode:
git clone https://github.com/TimChild/mkdocs-llms-source.git
cd mkdocs-llms-source
uv sync --all-extras
Running Tests¶
With coverage:
Linting¶
Auto-fix:
Building Docs¶
The project dogfoods its own plugin:
Project Structure¶
src/mkdocs_llms_source/plugin.py— Main plugin implementationtests/— Test suite with fixturesdocs/— Human-facing documentation (published via MkDocs)agent-docs/— Agent working notes (not published)
Architecture¶
The plugin hooks into MkDocs' build lifecycle:
on_config— Validates thatsite_urlis seton_files— Tracks available source fileson_nav— Walks the nav tree to build llms.txt section structureon_page_markdown— Captures raw markdown content for each pageon_post_build— Writesllms.txt,llms-full.txt, and copies.mdfiles
Key design decision: source-first — we use original markdown source files, not HTML-to-Markdown conversion. This is simpler and preserves author formatting.