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.
- 14:02p95 crossed 800ms
- 14:11rolled back the cache flag
- 14:40write the postmortem
Same night — and the two days users felt it.
█ up▒ slow· down
79 percent uptime over 14 days, Aug 14 to Aug 27How 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
.mdfile into aMarkdownDocument— on the server, in a worker, or as tokens stream in. - Coerce
- Markdown attributes arrive as strings, so the adapter turns
value="0.86"into0.86, mapsclasstoclassName, and holds off until required props exist sorows.mapdoes 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.
- MDX / React✓–✓
- App .md file––✓
- README / GitHub–✓–
- Streaming tokens––✓
- auto-close dangling ::
- YAML all-or-nothing
- empty frame until props land
- incomplete YAML can throwhold last good tree