Skip to content

feat(llms): Update docs llm.txt for better AI readability#326

Merged
Nonnyjoe merged 1 commit into
mainfrom
temp/update-llmtxt
May 18, 2026
Merged

feat(llms): Update docs llm.txt for better AI readability#326
Nonnyjoe merged 1 commit into
mainfrom
temp/update-llmtxt

Conversation

@Nonnyjoe
Copy link
Copy Markdown
Member

No description provided.

…idance

serve-markdown plugin (plugins/serve-markdown.js):
- Serves raw Markdown for every doc page via .md URL suffix and
  Accept: text/markdown content negotiation in dev
- Generates .md files alongside HTML in the static build (postBuild)
- Generates llms-full.txt — all docs concatenated for LLM bulk ingestion
- Injects blockquote llms.txt discovery directive into every served page:
  "> For the complete documentation index, see [llms.txt](/llms.txt)"
- Dynamic /llms.txt handler rewrites the production domain to the
  incoming request host so scanners on ngrok/staging follow local links
- LLMS_INDEX_ROUTES: /cartesi-rollups/2.0/ serves llms.txt (navigation
  index) instead of the overview page for agents entering the section
- SECTION_ALIASES: virtual /cartesi-rollups/overview.md route proxies
  the v2.0 overview source file, keeping it accessible after the
  section root is reserved for llms.txt
- Fixed double-slash bug in toPermalink for index .md URLs
- Fixed trailing slash normalisation in buildUrlMap for versioned docs

Visually-hidden HTML element (src/theme/Root.js):
- Server-rendered SR-only div with link to /llms.txt and .md URL hint
- Satisfies llms-txt-directive-html scoring check

llms.txt (static/llms.txt):
- Removed all v1.5 sections to prevent LLM version blending
- Converted all 210 page links from HTML trailing-slash URLs to direct
  .md URLs so agents fetch raw Markdown without extra steps
- Added 24 legacy Cartesi Compute SDK tutorial pages (/tutorials/)
- Updated overview link from 2.0.md to overview.md (virtual alias)
- Fixed broken links: new-to-cartesi, earn-ctsi, cli-account-abstraction
- Expanded Instructions for AI Agents section with version priority rule,
  documentation map, and v2.0 vs v1.5 differences table
@Nonnyjoe Nonnyjoe merged commit 8ee74db into main May 18, 2026
1 check passed
@Nonnyjoe Nonnyjoe deleted the temp/update-llmtxt branch May 18, 2026 18:03
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.

2 participants