Serve Markdown
Add Markdown rendering with the @primate/markdown
module. Write content in
Markdown; Primate renders it to HTML on the server.
Markdown is converted to HTML for display.
npm i @primate/markdown
import config from "primate/config";
import markdown from "@primate/markdown";
export default config({ modules: [markdown()] });
<!-- components/Welcome.md -->
# Hello, World!
This is **Markdown** content.
// routes/index.ts
import route from "primate/route";
import response from "primate/response";
route.get(() => response.view("Welcome.md"));