Skip to content

Commit 987b109

Browse files
authored
chore: add llms.txt generation for LLM-friendly docs (#39)
Generate llms.txt and llms-full.txt at docs build time following the llmstxt.org standard. The concise index links to API sections while the full file contains complete TypeScript type signatures for all 5 packages with an LLM agent instructions section. - Add scripts/generate-llms-txt.ts (reads versions from package.json) - Add static/robots.txt pointing sitemap to llms.txt - Update docs workflow to run generation + copy static files - Add docs:llms script to package.json
1 parent 25e70ec commit 987b109

4 files changed

Lines changed: 1120 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
- name: Generate API docs
4343
run: bun run docs
4444

45+
- name: Generate LLM-friendly docs
46+
run: bun run scripts/generate-llms-txt.ts
47+
48+
- name: Copy static files
49+
run: cp static/robots.txt docs/
50+
4551
- uses: actions/configure-pages@v5
4652

4753
- uses: actions/upload-pages-artifact@v3

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"release": "bun run scripts/publish.ts",
1616
"lint:changesets": "bun run scripts/lint-changeset-headers.ts",
1717
"docs": "typedoc",
18+
"docs:llms": "bun run scripts/generate-llms-txt.ts",
1819
"size": "size-limit"
1920
},
2021
"devDependencies": {

0 commit comments

Comments
 (0)