Renderer
A lightweight service for rendering Markdown and plain text to HTML.
Overview
This service supports two rendering modes:
- Route-based rendering (
/docs/page->/docs/page.mdor/docs/page/README.md) - Remote-source rendering (
/api/markdown/render?src=https://...)
Endpoints
GET /healthzHealth check.GET /api/markdown/render?src=https://...Fetches Markdown from a remote HTTP/HTTPS URL and returns rendered HTML.POST /api/markdown/renderReads Markdown directly from request body and returns rendered HTML.GET /api/text/render?src=https://...&title=...Fetches plain text from a remote HTTP/HTTPS URL and returns rendered HTML (titleis optional, defaults toText Viewer).GET /<route-without-extension>Resolves Markdown in order:<route>.md<route>/README.mdReturns rendered HTML if found, otherwise a rendered404error page.
Rendering Features
- Markdown rendering powered by
marked - Server-side code highlighting via
highlight.js - Server-side math rendering via
katex(SSR) - TOC placeholders:
[toc]and<!-- TOC --> - GitHub-like Markdown style (
github-markdown-css) - HTML error pages for API and route rendering failures
Quick Start Examples
| Example | Description |
|---|---|
/test/error |
Non-existent route used to trigger a 404 page |
/test/syntax |
Markdown syntax playground page |
| Render Remote README | Render the Marked project README from GitHub Raw via the API |
| Markdown Error Page Test | Test the markdown-rendering HTML error page |
| Render Remote Text | Render a remote plain text file via the text API |
| Text Error Page Test | Test the text-rendering HTML error page |