Publish llms.txt and llms-full.txt alongside documentation #41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When documentation is published, also publish AI-readable versions in the llmstxt.org standard format:
llms.txt— brief markdown index with links to all pagesllms-full.txt— full concatenated markdown of every pageThese should appear in the built site root so they are accessible at the versioned URL alongside the normal HTML docs.
Findings
The fenliu package uses MkDocs with Material theme, versioned by mike and deployed via Woodpecker CI on
fenliu-*tags. Themike deploycall in.woodpecker/fenliu-docs.ymlpublishes whatevermkdocs buildputs insite/— so files added there automatically get published.Plan
Use a MkDocs hook (no extra dependency) to generate both files during every build:
packages/fenliu/hooks/llms_txt.pyimplementing three MkDocs events:on_env— reset module-level page list at start of each buildon_page_markdown— collect (title, canonical_url, markdown) per pageon_post_build— writellms.txt(index with links) andllms-full.txt(all pages concatenated) tosite/hooks: [hooks/llms_txt.py]tomkdocs.ymlpackages/fenliu/TODO.md