A uv tool that wraps marimo export, extracts rendered outputs from the HTML export, and injects them into the markdown export.
The result is a markdown document with tables (as GFM or HTML), console output, and other cell outputs, plus a sidecar assets directory for figures and the intermediate HTML notebook.
mo.md() cells come through as plain markdown — including f-strings, whose interpolated values are substituted and whose math stays as $...$.
Pass --self-contained to embed figures as base64 data URIs instead of writing them out.
Write your marimo .py notebook — cell outputs are rendered by default:
fig, ax = plt.subplots()
ax.plot(x, np.sin(x))
figThen run:
uvx marimo-md-export notebook.py output.mdThis writes output.md, plus output_assets/notebook.html and output_assets/figure-1.png (and so on).
marimo-md-export is designed to produce markdown pages for static site generators like mkdocs or zensical.
Both work identically for this purpose.
1. Add as a docs dependency:
uv add --group docs marimo-md-export2. Add a build step that converts your notebook(s) before building the site.
For example, this project uses the following just command to build the docs:
docs:
marimo-md-export examples/notebook.py docs/example.md
zensical buildThis runs marimo-md-export to produce a markdown page (with cell outputs injected) and its assets directory, then builds the site.
uv sync # sync packages
just # run lint, typecheck, test, build docs