Skip to content

docs(site): add llms.txt + Copy-as-Markdown + Open-in-ChatGPT/Claude#36

Merged
theagenticguy merged 1 commit into
mainfrom
docs/llm-features
Apr 27, 2026
Merged

docs(site): add llms.txt + Copy-as-Markdown + Open-in-ChatGPT/Claude#36
theagenticguy merged 1 commit into
mainfrom
docs/llm-features

Conversation

@theagenticguy
Copy link
Copy Markdown
Owner

Summary

Adds the 2026 LLM-integration kitchen sink for the Starlight docs site:

  • /llms.txt, /llms-full.txt, /llms-small.txt generated at build time (LLM-crawlable, concatenated markdown).
  • Three scoped subsets: /_llms-txt/user-guide.txt, /_llms-txt/mcp.txt, /_llms-txt/contributing.txt — promote start-here/**, guides/**, mcp/**; demote architecture/**, contributing/**.
  • Per-page buttons on every page: Copy as Markdown · View as Markdown · Open in ChatGPT · Open in Claude · Share dropdown.
  • Build-time broken-link gate via starlight-links-validator so llms-full.txt never ships dead URLs to LLMs.

Plugins

All MIT, all dev-only (packages/docs is private → excluded from the production license audit).

Plugin Version Role
starlight-llms-txt 0.8.1 llms.txt + llms-full.txt + llms-small.txt + customSets
starlight-page-actions 0.6.0 Copy/View-Markdown + ChatGPT/Claude links + Share
starlight-links-validator 0.24.0 Build-time link check

Conflict resolved

Both starlight-llms-txt and starlight-page-actions can emit /llms.txt. Fix: omit baseUrl in page-actions config, let starlight-llms-txt own the route.

Debunks from research

  • theagenticguy/ai-gateway does NOT use Starlight — it's a README-only repo. Not a usable reference implementation.
  • starlight-copy-markdown, starlight-claude, @astrojs/starlight-ai, starlight-ask-ai don't exist on npm. starlight-page-actions covers the real surface.
  • No first-party "Ask AI" plugin exists; embed Kapa/Inkeep/Mendable later if we want that.

Test plan

  • pnpm -F @opencodehub/docs build — 35 pages + 4 llms*.txt files + 3 customSets + pagefind + sitemap, 4.64s
  • Links validator: "All internal links are valid."
  • Rendered HTML contains https://chatgpt.com/?q=... and https://claude.ai/new?q=... deep-links on every page
  • llms.txt head renders project description + doc-set index correctly
  • llms-full.txt: 3140 lines — full site bundle
  • pnpm exec biome check . — 0 errors / 0 warnings
  • pnpm -r exec tsc --noEmit — exit 0
  • scripts/check-banned-strings.sh — PASS
  • license-checker-rseidelsohn --production --excludePrivatePackages — exit 0
  • Pages deploy green after merge
  • curl https://theagenticguy.github.io/opencodehub/llms.txt returns 200

Wires three community Starlight plugins into the docs site:

- starlight-llms-txt@0.8.1 — emits /llms.txt, /llms-full.txt,
  /llms-small.txt at build time, plus three custom sets
  (/_llms-txt/{user-guide,mcp,contributing}.txt) so LLMs can crawl
  scoped subsets.
- starlight-page-actions@0.6.0 — per-page "Copy as Markdown",
  "View as Markdown", "Open in ChatGPT", "Open in Claude", and
  Share dropdown. baseUrl intentionally omitted to avoid the
  /llms.txt collision with starlight-llms-txt.
- starlight-links-validator@0.24.0 — build-time broken-link gate
  so llms-full.txt never ships dead URLs to LLMs.

All three are MIT. packages/docs is private, so they sit in
devDependencies and are excluded from the production license audit.
@theagenticguy theagenticguy merged commit 75b9988 into main Apr 27, 2026
15 of 16 checks passed
@theagenticguy theagenticguy deleted the docs/llm-features branch April 27, 2026 18:06
@github-actions github-actions Bot mentioned this pull request Apr 27, 2026
theagenticguy added a commit that referenced this pull request May 1, 2026
…36)

## Summary

Adds the 2026 LLM-integration kitchen sink for the Starlight docs site:

- **`/llms.txt`, `/llms-full.txt`, `/llms-small.txt`** generated at
build time (LLM-crawlable, concatenated markdown).
- **Three scoped subsets**: `/_llms-txt/user-guide.txt`,
`/_llms-txt/mcp.txt`, `/_llms-txt/contributing.txt` — promote
`start-here/**`, `guides/**`, `mcp/**`; demote `architecture/**`,
`contributing/**`.
- **Per-page buttons** on every page: Copy as Markdown · View as
Markdown · Open in ChatGPT · Open in Claude · Share dropdown.
- **Build-time broken-link gate** via `starlight-links-validator` so
llms-full.txt never ships dead URLs to LLMs.

## Plugins

All MIT, all dev-only (packages/docs is private → excluded from the
production license audit).

| Plugin | Version | Role |
|---|---|---|
| `starlight-llms-txt` | 0.8.1 | llms.txt + llms-full.txt +
llms-small.txt + customSets |
| `starlight-page-actions` | 0.6.0 | Copy/View-Markdown + ChatGPT/Claude
links + Share |
| `starlight-links-validator` | 0.24.0 | Build-time link check |

## Conflict resolved

Both `starlight-llms-txt` and `starlight-page-actions` can emit
`/llms.txt`. Fix: omit `baseUrl` in page-actions config, let
`starlight-llms-txt` own the route.

## Debunks from research

- `theagenticguy/ai-gateway` does NOT use Starlight — it's a README-only
repo. Not a usable reference implementation.
- `starlight-copy-markdown`, `starlight-claude`,
`@astrojs/starlight-ai`, `starlight-ask-ai` don't exist on npm.
`starlight-page-actions` covers the real surface.
- No first-party "Ask AI" plugin exists; embed Kapa/Inkeep/Mendable
later if we want that.

## Test plan

- [x] `pnpm -F @opencodehub/docs build` — 35 pages + 4 llms*.txt files +
3 customSets + pagefind + sitemap, 4.64s
- [x] Links validator: "All internal links are valid."
- [x] Rendered HTML contains `https://chatgpt.com/?q=...` and
`https://claude.ai/new?q=...` deep-links on every page
- [x] `llms.txt` head renders project description + doc-set index
correctly
- [x] `llms-full.txt`: 3140 lines — full site bundle
- [x] `pnpm exec biome check .` — 0 errors / 0 warnings
- [x] `pnpm -r exec tsc --noEmit` — exit 0
- [x] `scripts/check-banned-strings.sh` — PASS
- [x] `license-checker-rseidelsohn --production
--excludePrivatePackages` — exit 0
- [ ] Pages deploy green after merge
- [ ] `curl https://theagenticguy.github.io/opencodehub/llms.txt`
returns 200
This was referenced May 1, 2026
@github-actions github-actions Bot mentioned this pull request May 11, 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.

1 participant