Repository navigation
feat(web): llms.txt, llms-full.txt, llms-small.txt and per-page Markdown for guides and API - #4356
Conversation
…own for guides and API Serve plain-text docs for language models from the guides and API sites: an llms.txt index, llms-full.txt (every current-version page), llms-small.txt (an outline of the current version), one set per docs version under /llms-txt/, and every page as Markdown at <page URL>.md. The current version comes from versions.ts. Built by plain Astro endpoints over the content collection, with no new dependencies. Add a wheels.dev/llms.txt index, and a CI check that fails the deploy when a file is missing, a link doesn't resolve, a page lacks its .md, or a non-current version leaks into llms-full / llms-small. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
rev1-r3 review @ 87890d7: code APPROVE (final sign-off after PR CI, including the guides and API builds with the new
Not blocking:
|
Review @ 87890d7 (text:
|
|
rev1-r3 review @ 87890d7: APPROVE (final; PR CI checked) PR CI on this head: 20 pass, 3 skipped, 0 failing or pending. Both docs deploys ran the new step and it passed:
So on the real builds every file exists, every |
Summary
Adds plain-text docs for language models (llms.txt) to the guides and API sites, plus a root index on wheels.dev. Today
guides.wheels.dev/llms.txtandapi.wheels.dev/llms.txtare 404.wheels.dev/llms.txtanswers 200 only because the landing host serves the home page for unknown paths; that's fixed in a separate PR.Served on both guides.wheels.dev and api.wheels.dev:
/llms.txt/llms-full.txt/llms-small.txt/llms-txt/<version>.txt<page URL>.md/v4-1-0/basics/routing.md.Plus
wheels.dev/llms.txt, a static index (web/sites/landing/public/llms.txt). It links the guides and APIllms.txt, and lists the blog and packages as sections.How it's built
starlight-llms-txt@0.10.0, the only line compatible with the Astro 6.4.6 these sites actually build with, ignoresexcludeforllms-full.txt, which then held all five guides versions (7.6 MB measured). Newer releases need Starlight 0.41 or later.src/pages/llms.txt.ts,llms-full.txt.ts,llms-small.txt.ts,llms-txt/[slug].txt.tsand[...slug].md.tsin each site. They're thin wrappers over the shared@wheels-dev/ui/data/llms(packages/ui/src/data/llms.ts). (_llms-txt/couldn't be used: Astro ignores page directories that start with_.)currententry inversions.ts, so when a version flip makes 4.2 current (draft docs(web): make the 4.2 guides, API reference and home page links current #4322), all of this follows with no further edit.sidebar.hidden: trueorpagefind: false). The site rootindexpage is a version list, so it's left out too.importlines removed. Components such as<Aside>stay as written.CI check:
web/scripts/check-llms.mjs. It runs inweb-deploy.ymlafter the guides and API builds, before deploying. It fails when:llms.txtto the site doesn't resolve to a built file;llms-full.txtorllms-small.txt;.md, or a.mdhas no page. Meta-refresh redirect stubs are skipped.Its fixture tests,
web/scripts/check-llms.test.mjs(7 cases), run inweb-scripts-tests.yml. They cover a consistent build passing, a version leak into each of full and small, a broken link, a missing and an orphan.md, missing and empty files, and theversions.tsparse.Measured (develop + this branch; current version v4-1-0)
llms-small.txtis about 20k tokens per site.wheels.dev/llms.txtis 1.3 KB.node scripts/check-llms.mjs sites/guides/dist guidesand… sites/api/dist apipass on the real builds. The fixture tests are 7/7.pnpm buildpasses for guides, API and landing, and Prettier is clean.actionlintshows no new findings (the 2 existing shellcheck notes are indetect-scope).Noticed while checking, not changed here: the v4-1-0 guides landing page (
v4-1-0/index.mdx) is titled "Wheels 4.0".🤖 Generated with Claude Code