Skip to content

fix: generate llms.txt from mkdocs nav to fix dead links#160

Merged
MilagrosMarin merged 1 commit intomainfrom
fix/generate-llms-txt
Apr 8, 2026
Merged

fix: generate llms.txt from mkdocs nav to fix dead links#160
MilagrosMarin merged 1 commit intomainfrom
fix/generate-llms-txt

Conversation

@dimitri-yatsenko
Copy link
Copy Markdown
Member

Summary

  • llms.txt links were all 404s — they used source file paths (.md, .ipynb) but MkDocs serves at /path/ (no extension, trailing slash)
  • Now llms.txt is auto-generated from mkdocs.yaml nav by gen_llms_full.py, alongside llms-full.txt
  • Removed src/llms.txt from git tracking (added to .gitignore)
  • Updated docker-compose.yaml to run generation in both LIVE and BUILD modes

How it works

gen_llms_full.py reads the nav section from mkdocs.yaml and converts each source path to a deployed URL:

  • about/whats-new-2.md/about/whats-new-2/
  • tutorials/basics/01-first-pipeline.ipynb/tutorials/basics/01-first-pipeline/
  • api//api/

The generated llms.txt stays in sync with the nav automatically — no manual maintenance needed.

🤖 Generated with Claude Code

llms.txt was a hand-maintained static file with source file paths
(.md, .ipynb) as links. MkDocs serves pages at /path/ (no extension),
so all links were 404s on the deployed site.

Now llms.txt is auto-generated alongside llms-full.txt by
gen_llms_full.py, which reads the mkdocs.yaml nav and converts
source paths to deployed URLs. The static llms.txt is removed from
git tracking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MilagrosMarin MilagrosMarin merged commit c7eb390 into main Apr 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants