Skip to content

Commit f428f0e

Browse files
committed
feat: Add llms.txt support for AI-friendly documentation
Fixes #8117 Adds llms.txt and llms-full.txt generation following https://llmstxt.org/ spec to ensure AI models can access the latest React documentation. - llms.txt: 13KB hierarchical link index (167 pages) - llms-full.txt: 2.7MB full embedded documentation Generated from sidebar configs and markdown content at build time. Integrated into build pipeline via package.json scripts.
1 parent d271a7a commit f428f0e

File tree

4 files changed

+92822
-1
lines changed

4 files changed

+92822
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"analyze": "ANALYZE=true next build",
88
"dev": "next-remote-watch ./src/content",
9-
"build": "next build && node --experimental-modules ./scripts/downloadFonts.mjs",
9+
"build": "next build && node --experimental-modules ./scripts/downloadFonts.mjs && node scripts/generate-llms-txt.js",
1010
"lint": "next lint && eslint \"src/content/**/*.md\"",
1111
"lint:fix": "next lint --fix && eslint \"src/content/**/*.md\" --fix",
1212
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
@@ -21,6 +21,7 @@
2121
"postinstall": "yarn --cwd eslint-local-rules install && is-ci || husky install .husky",
2222
"check-all": "npm-run-all prettier lint:fix tsc rss",
2323
"rss": "node scripts/generateRss.js",
24+
"llms": "node scripts/generate-llms-txt.js",
2425
"deadlinks": "node scripts/deadLinkChecker.js",
2526
"copyright": "node scripts/copyright.js",
2627
"test:eslint-local-rules": "yarn --cwd eslint-local-rules test"

0 commit comments

Comments
 (0)