Problem
The canonical docs URLs return HTML even when a client sends Accept: text/markdown. Processed Markdown is already available through the internal llms.mdx route, but AI agents and other Markdown clients need to know and construct a separate URL.
Expected behavior
Requests to /docs/... that prefer Markdown should return the processed documentation with Content-Type: text/markdown. Normal browser requests should continue to receive HTML.
Acceptance criteria
Accept: text/markdown returns a successful Markdown response from the canonical docs URL.
- The response is served with
Content-Type: text/markdown.
Accept: text/html continues to return the rendered HTML page.
- Existing per-page Markdown and LLM endpoints continue to work.
Runtime verification
Tested with /docs/openui-lang:
- Markdown request:
200 OK, rewritten to /llms.mdx/docs/openui-lang, Content-Type: text/markdown.
- HTML request:
200 OK, Content-Type: text/html; charset=utf-8.
Related implementation
Draft PR: #782
Problem
The canonical docs URLs return HTML even when a client sends
Accept: text/markdown. Processed Markdown is already available through the internalllms.mdxroute, but AI agents and other Markdown clients need to know and construct a separate URL.Expected behavior
Requests to
/docs/...that prefer Markdown should return the processed documentation withContent-Type: text/markdown. Normal browser requests should continue to receive HTML.Acceptance criteria
Accept: text/markdownreturns a successful Markdown response from the canonical docs URL.Content-Type: text/markdown.Accept: text/htmlcontinues to return the rendered HTML page.Runtime verification
Tested with
/docs/openui-lang:200 OK, rewritten to/llms.mdx/docs/openui-lang,Content-Type: text/markdown.200 OK,Content-Type: text/html; charset=utf-8.Related implementation
Draft PR: #782