Vision
Create a single markdown format that works as:
- A marimo notebook (
marimo edit notebook.md)
- A Slidev presentation (
slidev notebook.md)
Current State
Marimo has nb.md format using code fences with {.marimo} class:
Slidev uses marimo-live code fences or <MarimoCell> components to reference cells.
Proposed Format
Extend marimo's nb.md format with:
- Slide separators (
---) that marimo ignores but Slidev uses
- Cell naming via attributes or comments
<MarimoCell> references between slides
Example:
---
title: My Notebook/Presentation
marimo-version: 0.19.7
---
\`\`\`python {.marimo name="imports"}
import marimo as mo
import altair as alt
\`\`\`
\`\`\`python {.marimo name="slider"}
slider = mo.ui.slider(1, 100)
slider
\`\`\`
---
# Slide 1: Interactive Demo
<MarimoCell cell="slider" />
---
# Slide 2: Results
<MarimoCell cell="chart" />
How It Would Work
For marimo edit notebook.md
- Marimo reads code fences with
{.marimo}, ignores --- and <MarimoCell>
- Runs as normal reactive notebook
For slidev notebook.md
- Slidev addon:
- Starts marimo kernel in headless mode (background process)
- Renders slides with
<MarimoCell> components
- Components fetch output from running kernel
Benefits
- Single source of truth
- Full IDE support for Python code
- Works offline in either mode
- No code duplication between notebook and slides
Vision
Create a single markdown format that works as:
marimo edit notebook.md)slidev notebook.md)Current State
Marimo has
nb.mdformat using code fences with{.marimo}class:Slidev uses
marimo-livecode fences or<MarimoCell>components to reference cells.Proposed Format
Extend marimo's nb.md format with:
---) that marimo ignores but Slidev uses<MarimoCell>references between slidesExample:
How It Would Work
For
marimo edit notebook.md{.marimo}, ignores---and<MarimoCell>For
slidev notebook.md<MarimoCell>componentsBenefits