import { readJson, route } from "@/lib/http"; import { renderMarkdown } from "@/lib/markdown"; /** Body: { markdown } -> { html }, rendered by the site's own pipeline. */ export const POST = route(async (req) => { const { markdown } = await readJson<{ markdown?: string }>(req); return Response.json({ html: await renderMarkdown(markdown ?? "") }); });