[PR #5823] feat(docs): adding .md to docs pages shows raw markdown #11605

Closed
opened 2026-02-16 18:16:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5823

State: closed
Merged: Yes


Summary

  • Adds a new API endpoint that serves raw MDX content when .md is appended to any docs URL
  • Enables programmatic access to documentation source files

Examples

  • /docs/config.md → returns raw MDX for the config page
  • /docs/index.md → returns raw MDX for the index page
  • /docs/mcp-servers.md → returns raw MDX for the MCP servers page

Implementation

Uses Astro's content collections API to look up docs by slug and returns the raw body content with text/plain content type.

Example:

image
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5823 **State:** closed **Merged:** Yes --- ## Summary - Adds a new API endpoint that serves raw MDX content when `.md` is appended to any docs URL - Enables programmatic access to documentation source files ## Examples - `/docs/config.md` → returns raw MDX for the config page - `/docs/index.md` → returns raw MDX for the index page - `/docs/mcp-servers.md` → returns raw MDX for the MCP servers page ## Implementation Uses Astro's content collections API to look up docs by slug and returns the raw body content with `text/plain` content type. Example: <img width="1057" height="685" alt="image" src="https://github.com/user-attachments/assets/d03c5456-c480-469d-b3b1-1fa74abe32ff" />
yindo added the pull-request label 2026-02-16 18:16:29 -05:00
yindo closed this issue 2026-02-16 18:16:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11605