opencode
opencode copied to clipboard
feat(docs): adding .md to docs pages shows raw markdown
Summary
- Adds a new API endpoint that serves raw MDX content when
.mdis 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: