Skip to content

View on a desktop screen for a better experience.

Comark · no MDX

Graphs inside a plain Markdown file

Put ::graph-* blocks in a .md file; Comark parses them and these graphs draw the frames — no MDX, no compile step. Sébastien Chopin's demo is the reference implementation; the adapter here is graph-comark.

Source and rendered view of the same file

The source is CommonMark plus Comark component blocks; the rendered side uses the same graphs as the docs. Toggle to read the Markdown that produced them.

p95 crossed 800ms at 14:02. Rollback at 14:11.

[ NIGHT ]
  1. 14:02p95 crossed 800ms
  2. 14:11rolled back the cache flag
  3. 14:40write the postmortem

Same night — and the two days users felt it.

[ API ]

79%

Aug 14Aug 27

up slow· down

79 percent uptime over 14 days, Aug 14 to Aug 27

How the pieces fit

You own three files: parsing stays in Comark, the graphs stay copied via shadcn, and the adapter is the only new piece.

Parse
Comark turns the .md file into a MarkdownDocument — on the server, in a worker, or as tokens stream in.
Coerce
Markdown attributes arrive as strings, so the adapter turns value="0.86" into 0.86, maps class to className, and holds off until required props exist so rows.map does not throw mid-stream.
Render
Each ::graph-* tag is already on the allowlist, and the same React graph you copied from the registry draws the frame.

Where each format belongs

Use JSX in MDX, the fenced ASCII on GitHub and READMEs, and Comark when you need a plain .md file that can stream as it arrives.

[ HOST ]
JSXASCIIComark
  • MDX / React
  • App .md file
  • README / GitHub
  • Streaming tokens
[ STREAM ]
  • auto-close dangling ::
  • YAML all-or-nothing
  • empty frame until props land
  • incomplete YAML can throwhold last good tree
3 of 4 done

Install the adapter

all.json already includes it; if the graphs are already in the repo, add graph-comark alone. Pass graphComponents to Comark. Streaming caveats and the full wiring live on the docs page.

Adapter