Charon
Charon renders Markdown as an HTML string in Node, a worker or the browser. It needs no DOM. It also builds docs sites from a folder of Markdown: this site is one.
Render a string #
import { renderToHtml } from '@memomori/charon'
const html = await renderToHtml('# Hello\n\nSome **bold** text.')
Import @memomori/charon/styles.css and wrap the HTML in <article class="charon">
to style it. See Render in your app.
Build a docs site #
charon build docs -o site
Every .md file under docs/ becomes a page with a sidebar, search, anchor
links and a Markdown copy. See Build a docs site.
What it reads #
CommonMark and GFM, plus:
- footnotes, definition lists, abbreviations,
^sup^,~sub~,==mark==,++ins++,:emoji:and{.attrs} - math with
$inline$and$$block$$, drawn by KaTeX - callouts such as
> [!NOTE] [[wikilinks]],![[embeds]],^block-idsand#tags%%comments%%- highlighted code, CSV and TSV tables, and Mermaid diagrams
Markdown syntax shows each one with its output.
License #
MIT.