Install jupyter-book-marimo into the same Python environment that builds your Jupyter
Book.
pip install jupyter-book-marimoFor a uv-managed book project, add it as a dependency:
uv add jupyter-book-marimoRegister the executable plugin in myst.yml:
project:
plugins:
- type: executable
path: .venv/bin/jupyter-book-marimoSet path to the plugin executable for the environment that runs jupyter-book build.
The path is resolved from the book source directory. In this repository, myst.yml
lives in docs/ and the virtual environment lives one directory up:
project:
plugins:
- type: executable
path: ../.venv/bin/jupyter-book-marimoBuild the book normally:
jupyter-book build --htmlIn this repository, run the docs build through the Makefile:
make book-build
make book-startmake book-build runs Jupyter Book with --strict. make book-start serves the built
site on http://localhost:3102.
First Page¶
Add a marimo cell to any MyST Markdown page:
```{marimo} python
import marimo as mo
slider = mo.ui.slider(start=1, stop=10, label="islands")
slider
```
```{marimo} python
mo.md(f"The slider is set to **{slider.value}**.")
```The build executes the page and writes a static preview. The browser hydrates the same cells so the slider can update the Markdown output.