Skip to content

Add llms.txt and per-page markdown for LLM-friendly docs#2185

Open
Erol444 wants to merge 2 commits intomainfrom
add-llms-txt
Open

Add llms.txt and per-page markdown for LLM-friendly docs#2185
Erol444 wants to merge 2 commits intomainfrom
add-llms-txt

Conversation

@Erol444
Copy link
Copy Markdown
Contributor

@Erol444 Erol444 commented Mar 31, 2026

Summary

  • Adds docs/scripts/generate_llms_txt.py — a post-build script that generates llms.txt, llms-full.txt, and per-page .md files from the mkdocs.yml nav structure
  • Adds a CI step in the docs workflow to run the script after zensical build, plus a verification check
  • The script auto-discovers pages from mkdocs.yml — no manual file lists to maintain

How it works

  • Parses mkdocs.yml nav to find all doc pages
  • Copies source .md files into site/ alongside their HTML counterparts (e.g. site/start/overview/index.md)
  • Generates llms.txt with links to all 302 pages across 4 sections
  • Generates llms-full.txt with full content for 102 curated pages (~600KB), excluding auto-generated directory-expanded pages (workflow blocks, kinds, gallery) to keep it focused

Why

inference.roboflow.com currently fails coding agent benchmarks for LLM discoverability:

  • No llms.txt
  • No .md URL support
  • No agent discoverability directives

This addresses all three.

Test plan

  • Tested locally: zensical build && python docs/scripts/generate_llms_txt.py
  • Verified llms.txt, llms-full.txt, and .md files are served correctly
  • CI docs workflow passes

🤖 Generated with Claude Code

Adds a post-build script that runs after `zensical build` to generate:
- llms.txt: structured index linking to .md versions of all doc pages
- llms-full.txt: full documentation content for curated (non-generated) pages
- Per-page .md files served alongside HTML in the site output

The script parses mkdocs.yml nav automatically, so new docs are picked up
without manual updates. Directory-expanded pages (blocks, kinds, gallery)
are linked in llms.txt but excluded from llms-full.txt to keep it focused.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Erol444 Erol444 enabled auto-merge (squash) March 31, 2026 11:51
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