Skip to content

feat: serve agent-facing markdown via content negotiation - #71

Draft
natemoo-re wants to merge 4 commits into
mainfrom
feat/agents
Draft

feat: serve agent-facing markdown via content negotiation#71
natemoo-re wants to merge 4 commits into
mainfrom
feat/agents

Conversation

@natemoo-re

Copy link
Copy Markdown
Member

What does this PR do?

Agents reading these docs get full HTML, or raw MDX (imports, JSX) from starlight-markdown — and static hosting can't vary a response on Accept. This serves true markdown through the layer that can, following the patterns in Optimizing Content for Agents: negotiate on Accept: text/markdown, serve markdown from canonical source, keep the cache honest.

  • serve a clean markdown twin of every page at {slug}/index.md, flattening MDX components on the remark AST
  • negotiate Accept: text/markdown and explicit .md paths in the router via internal URL rewrite, so each variant gets its own cache key
  • serve a sitemap-style markdown index at /docs/index.md, advertised via Link headers and <link rel="alternate">
  • answer unknown markdown requests with a 404 pointing at the index
  • drop llms.txt (redundant with negotiation); keep docs-index.json for future local tooling

No linked issue — implements the agent-ready initiative.

Type of change

  • Typo
  • New Documentation for Feature
  • Improvement for Clarification
  • Chore (dependencies, CI, tooling)

AI-generated code disclosure

  • This PR includes AI-generated code

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bombsh-docs-router 0a186f3 Commit Preview URL

Branch Preview URL
Aug 15 2026, 03:55 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bombshell-docs 0a186f3 Commit Preview URL

Branch Preview URL
Aug 15 2026, 03:56 AM

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedremark@​15.0.11001009783100

View full report

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