A few simple helper functions to generate HTML from markdown. Just enough to get you started with markdown with Mastro.
Uses micromark with micromark-extension-gfm under the hood.
deno add jsr:@mastrojs/markdown
pnpm add jsr:@mastrojs/markdown
bunx jsr add @mastrojs/markdown
import { markdownToHtml } from "@mastrojs/markdown";
const { content, meta } = markdownToHtml(`
---
title: my title
---
hi *there*
`),To see all functions @mastrojs/markdown exports, see its API docs.
For a tutorial, read the following chapter in the Mastro Guide: A static blog from markdown files