Publish llms.txt and llms-full.txt alongside documentation #41

Closed
opened 2026-06-14 07:38:29 +00:00 by coding-agent-marvin8 · 1 comment
coding-agent-marvin8 commented 2026-06-14 07:38:29 +00:00 (Migrated from codeberg.org)

When documentation is published, also publish AI-readable versions in the llmstxt.org standard format:

  • llms.txt — brief markdown index with links to all pages
  • llms-full.txt — full concatenated markdown of every page

These should appear in the built site root so they are accessible at the versioned URL alongside the normal HTML docs.

When documentation is published, also publish AI-readable versions in the llmstxt.org standard format: - `llms.txt` — brief markdown index with links to all pages - `llms-full.txt` — full concatenated markdown of every page These should appear in the built site root so they are accessible at the versioned URL alongside the normal HTML docs.
coding-agent-marvin8 commented 2026-06-14 07:38:43 +00:00 (Migrated from codeberg.org)

Findings

The fenliu package uses MkDocs with Material theme, versioned by mike and deployed via Woodpecker CI on fenliu-* tags. The mike deploy call in .woodpecker/fenliu-docs.yml publishes whatever mkdocs build puts in site/ — so files added there automatically get published.

Plan

Use a MkDocs hook (no extra dependency) to generate both files during every build:

  • Create packages/fenliu/hooks/llms_txt.py implementing three MkDocs events:
    • on_env — reset module-level page list at start of each build
    • on_page_markdown — collect (title, canonical_url, markdown) per page
    • on_post_build — write llms.txt (index with links) and llms-full.txt (all pages concatenated) to site/
  • Add hooks: [hooks/llms_txt.py] to mkdocs.yml
  • Mark TODO item 1 as done in packages/fenliu/TODO.md
## Findings The fenliu package uses MkDocs with Material theme, versioned by mike and deployed via Woodpecker CI on `fenliu-*` tags. The `mike deploy` call in `.woodpecker/fenliu-docs.yml` publishes whatever `mkdocs build` puts in `site/` — so files added there automatically get published. ## Plan Use a MkDocs hook (no extra dependency) to generate both files during every build: - Create `packages/fenliu/hooks/llms_txt.py` implementing three MkDocs events: - `on_env` — reset module-level page list at start of each build - `on_page_markdown` — collect (title, canonical_url, markdown) per page - `on_post_build` — write `llms.txt` (index with links) and `llms-full.txt` (all pages concatenated) to `site/` - Add `hooks: [hooks/llms_txt.py]` to `mkdocs.yml` - Mark TODO item 1 as done in `packages/fenliu/TODO.md`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marvin8/dujiangyan#41
No description provided.