Skip to content

Add(Site): Generate llms.txt for LLM discovery - #413

Merged
1aron merged 1 commit into
master-co:rcfrom
0Miles:feat/386-llms-txt
May 3, 2026
Merged

1aron merged 1 commit into
master-co:rcfrom
0Miles:feat/386-llms-txt

Conversation

@0Miles

@0Miles 0Miles commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Closes #386.

Summary

Adds a build-time generator that walks every `app/[locale]/**/content.mdx` and emits two files in `public/`:

  • `llms.txt` — sectioned index per the llmstxt.org spec, ~280 lines
  • `llms-full.txt` — full-content concatenation, ~13K lines

`pnpm build:llms` is wired into the existing `pnpm build` chain. Output files are gitignored (regenerated on every build).

Changes

  • `site/scripts/generate-llms-txt.ts` — generator with pure helpers (`deriveTitle`, `pageUrl`, `renderLlmsIndex`, `renderLlmsFull`)
  • `site/scripts/generate-llms-txt.test.ts` — 8 Node-native test cases (heading extraction, sr-only stripping, route construction, sorted output, full concat)
  • `site/package.json` — `build:llms` + `test:llms` scripts
  • `.gitignore` — exclude generated output
  • `css-docs/internal-and-website.md` — documents the new build step

Testing

  • 8/8 Node tests pass via `tsx --test`
  • Real run on actual site content produces 280-line index + 13271-line full output, valid llms.txt format, no `[sr-only]` MDX directives leak into titles

@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown

@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel.

A member of the Team first needs to authorize it.

@0Miles 0Miles changed the title feat(site): generate llms.txt for LLM discovery, resolve #386 Add(Site): Generate llms.txt for LLM discovery Apr 30, 2026
- site/scripts/generate-llms-txt.ts: walks app/[locale]/**/content.mdx
  and emits public/llms.txt (sectioned index, ~280 lines) +
  public/llms-full.txt (full concat, ~13K lines)
- Wired into pnpm build via build:llms script (runs before build:repo)
- 8 Node-native test cases (heading extraction, sr-only stripping,
  route construction, sorted output, full concat)
- Output gitignored; regenerated on every build
- Updates css-docs/internal-and-website.md

Closes master-co#386
@0Miles
0Miles force-pushed the feat/386-llms-txt branch from 58034ca to 6983f72 Compare April 30, 2026 19:01
@1aron
1aron merged commit f9f96c9 into master-co:rc May 3, 2026
11 of 13 checks passed
1aron added a commit that referenced this pull request May 3, 2026
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.

Suggestion: Include a Text-Version of Documentation for LLM

2 participants