Skip to content

Serve docs as Markdown when requested#782

Merged
zahlekhan merged 1 commit into
thesysdev:mainfrom
zahlekhan:codex/serve-markdown-on-accept
Jul 16, 2026
Merged

Serve docs as Markdown when requested#782
zahlekhan merged 1 commit into
thesysdev:mainfrom
zahlekhan:codex/serve-markdown-on-accept

Conversation

@zahlekhan

@zahlekhan zahlekhan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect when a docs request prefers Markdown using Fumadocs content negotiation
  • rewrite matching /docs requests to the existing processed Markdown route
  • preserve the normal HTML response for browser requests

Why

The docs already expose processed Markdown through the llms.mdx route, but clients requesting Accept: text/markdown still received the HTML page at the canonical docs URL. This adds the Fumadocs-recommended negotiation layer for AI agents and other Markdown clients.

Validation

  • pnpm --filter @openuidev/docs types:check

closes #783

@zahlekhan
zahlekhan marked this pull request as ready for review July 16, 2026 12:04
@zahlekhan
zahlekhan merged commit 4aea658 into thesysdev:main Jul 16, 2026
2 checks passed
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.

Support Markdown content negotiation for docs pages

2 participants