scripts/generate-llms-txt.ts
Ghost doc — Real utility script at
scripts/generate-llms-txt.ts.Source
Running
Key Details
- Follows the
llms.txtconvention: one text file containing all documentation for AI model context. - Reads
docs/docs.jsonso output tracks the current navigation and API tabs. - Strips YAML frontmatter; converts MDX components (
<Warning>,<Tip>,<Note>) to blockquotes. - Each section includes a source URL back to the live docs page.
- The generator, route preview server, and browser smoke tests share the same manifest helper, so route changes cannot drift.
Related Validation
tests/docs-artifacts.test.tskeeps the committeddocs/llms-full.txtin sync with the current docs manifest.tests/docs-e2e.playwright.tsexercises docs routes and legacy redirects against a local preview server.