Skip to content

Serve llms.txt and llms-full.txt - #3994

Merged
hsbt merged 6 commits into
masterfrom
claude/epic-brattain-763825
Aug 6, 2026
Merged

Serve llms.txt and llms-full.txt#3994
hsbt merged 6 commits into
masterfrom
claude/epic-brattain-763825

Conversation

@hsbt

@hsbt hsbt commented Aug 5, 2026

Copy link
Copy Markdown
Member

https://www.ruby-lang.org/llms.txt returns 404, and the Evil Martians LLM discoverability scorecard at https://ruby.evilmartians.com/ recommends serving one. This adds _plugins/llms.rb, which generates /llms.txt and /llms-full.txt at build time from the site itself so neither can drift from the published pages.

llms.txt follows the llmstxt.org convention. It lists every English page that has a .md alternate, grouped by top-level section, titled from the front matter and described by the first sentence of the page, plus the ten latest English news posts. llms-full.txt inlines the full Markdown of the same pages (about 320 KB) for tools that want the whole site in one fetch. News posts are not inlined because two decades of announcements would add over 1 MB of archival text. Only the tagline in the header is authored.

This also excludes _site from the Markdown linter. The generated .md alternates have no front matter, so rake lint failed after any local build.

Generated with Claude Code

https://www.ruby-lang.org/llms.txt currently returns 404 and the Evil
Martians LLM discoverability scorecard recommends serving one. The file
follows the llmstxt.org convention and fills in the current stable
version and recent news via Liquid, so it needs no manual updates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hsbt
hsbt requested a review from a team as a code owner August 5, 2026 21:20
hsbt and others added 5 commits August 6, 2026 08:37
The generated Markdown alternates under _site have their front matter
stripped, so any lint run after a local build failed on them. CI never
saw this because rake test lints before building.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Now that every page and news post is also served as .md, the links can
target the Markdown routes directly instead of the HTML pages, which is
what LLM tools prefer to fetch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
llms.txt is only an index. llms-full.txt is the llmstxt.org companion
file for tools that want the whole site in one fetch, so it inlines the
Markdown of all English pages (about 330 KB). News posts are left out
because two decades of announcements would add over 1 MB of mostly
archival text. llms.txt links the file in its Optional section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The hand-written llms.txt duplicated page titles and descriptions, so
it would drift as pages change. The plugin now derives both llms.txt
and llms-full.txt from the same source: every English page with a .md
alternate, grouped by section, titled from its front matter, described
by its first sentence. Only the tagline stays authored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploying www-ruby-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: e1ecfcd
Status: ✅  Deploy successful!
Preview URL: https://119dc453.www-ruby-lang-org.pages.dev
Branch Preview URL: https://claude-epic-brattain-763825.www-ruby-lang-org.pages.dev

View logs

@hsbt hsbt changed the title Add llms.txt Serve llms.txt and llms-full.txt Aug 6, 2026
@hsbt
hsbt merged commit 76ac659 into master Aug 6, 2026
3 checks passed
@hsbt
hsbt deleted the claude/epic-brattain-763825 branch August 6, 2026 00:45
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.

1 participant