markdown-renderer-cli
v0.1.0
Published
Render extended markdown into real HTML and SVG with GFM, KaTeX, Mermaid, Graphviz, sanitization, and browser-backed static export.
Maintainers
Readme
markdown-renderer-cli
Render extended markdown into real HTML and SVG.
Supports:
- CommonMark and GFM
- Mermaid diagrams
- KaTeX-style math rendering
- trusted SVG and constrained raw HTML
- Graphviz / DOT fences
- browser-backed static export
Use
npx
npx markdown-renderer-cli render --in input.md --out output.html --mode staticbunx
bunx markdown-renderer-cli render --in input.md --out output.html --mode staticClient mode
Client mode keeps browser-only renderers as placeholders:
npx markdown-renderer-cli render --in input.md --out output.html --mode clientStatic mode
Static mode executes browser-only renderers in Chromium and emits final HTML:
npx markdown-renderer-cli render --in input.md --out output.html --mode staticLibrary API
import { renderToHtmlDocument, renderToStaticHtmlDocument } from 'markdown-renderer-cli'
const clientHtml = await renderToHtmlDocument(markdown)
const staticHtml = await renderToStaticHtmlDocument(markdown)Local development
pnpm install
pnpm exec playwright install chromium
pnpm test
pnpm test:e2e
pnpm buildNotes
- Static export uses Playwright + Chromium.
- Local end-to-end tests require a one-time
pnpm exec playwright install chromium. - CI installs Chromium before running end-to-end tests.
- Publishing is intended to use npm trusted publishing.
- The npm package name and executable are both
markdown-renderer-clifor the first public release.
Publishing
See PUBLISHING.md for the first-release and trusted-publishing steps.
License
MIT
