Skip to content

feat(seo): cover every docs page in /llms.txt and /llms-full.txt#652

Merged
arjunfagi merged 1 commit into
devfrom
feat/llms-txt-cover-all-pages
May 12, 2026
Merged

feat(seo): cover every docs page in /llms.txt and /llms-full.txt#652
arjunfagi merged 1 commit into
devfrom
feat/llms-txt-cover-all-pages

Conversation

@nik13
Copy link
Copy Markdown
Contributor

@nik13 nik13 commented May 12, 2026

Summary

Both src/pages/llms.txt.ts and src/pages/llms-full.txt.ts walked only tabNavigation. Any .mdx page on disk that isn't curated into navigation.ts was silently missing from the LLM-facing surfaces. A quick count showed ~83 pages on disk but not in nav — mostly cookbooks, release-notes follow-ups, and recently added pages.

Change

After this change both endpoints:

  1. Still emit the navigation-driven sections first (preserves the human-grouped section structure that AI crawlers can use as semantic anchors).
  2. Then sweep src/pages/docs/**/*.mdx and emit anything not yet linked:
    • In llms.txt: under an ### Additional Pages block at the end of ## Docs.
    • In llms-full.txt: appended after the nav-driven entries with the same ## Title / URL / content structure.
  3. Use the page's frontmatter title: when present; fall back to title-cased slug.

Why

  • New cookbook entries, release notes, FAQ updates, or any newly added doc page show up on the next deploy without needing a separate navigation.ts PR.
  • The cost is zero: the filesystem walk runs at build time, same as the existing nav walk.
  • Authoring stays the same — humans still curate navigation order; this is the safety net.

Test plan

  • npx tsc --noEmit clean on both endpoints
  • After deploy, curl https://docs.futureagi.com/llms.txt | grep -c "Additional Pages" returns 1
  • Spot-check a few cookbook URLs (e.g. /docs/cookbook/gepa-optimization) appear in /llms.txt and /llms-full.txt

🤖 Generated with Claude Code

Both endpoints walked only tabNavigation, so any .mdx page on disk
that isn't curated into navigation.ts was silently missing from
LLM-facing surfaces. With ~83 pages on disk but not in the nav
(mostly cookbooks, recent additions), the gap was non-trivial.

After this change both endpoints still emit the navigation-driven
sections first to preserve the human-grouped structure, then sweep
src/pages/docs/**/*.mdx and emit anything not yet linked under an
"Additional Pages" section (llms.txt) or as appended entries
(llms-full.txt). Frontmatter `title:` is used when present; the
slug is title-cased as a fallback.

New cookbook entries, release notes, FAQ updates, or any newly
added doc page now show up in /llms.txt and /llms-full.txt on the
next deploy without a navigation.ts edit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arjunfagi arjunfagi merged commit aa6455e into dev May 12, 2026
2 checks passed
@arjunfagi arjunfagi deleted the feat/llms-txt-cover-all-pages branch May 12, 2026 13:36
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