A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docs: mdx-marimo for publishing (#10208)
Péter Gyarmaticd9e40512fc9
diff --git a/docs/guides/exporting/index.md b/docs/guides/exporting/index.mdindex 4497d6f2ef..53468462bd 100644--- a/docs/guides/exporting/index.md+++ b/docs/guides/exporting/index.md@@ -29,3 +29,4 @@ For sharing interactive notebooks on the public web, consider using [molab](../m|------|-------------|| [Quarto](quarto.md) | Publish marimo Markdown with the Quarto extension || [Jupyter Book](jupyter_book.md) | Embed marimo cells in Jupyter Book |+| [MDX](mdx.md) | Embed marimo cells in MDX pages |diff --git a/docs/guides/exporting/mdx.md b/docs/guides/exporting/mdx.mdnew file mode 100644index 0000000000..0ada166100--- /dev/null+++ b/docs/guides/exporting/mdx.md@@ -0,0 +1,27 @@+# Publishing with MDX++[MDX](https://mdxjs.com/) combines Markdown with components for web frameworks.++marimo's [`mdx-marimo`](https://github.com/marimo-team/mdx-marimo) package+renders marimo code fences as connected, reactive cells inside MDX pages. Use+it to place Python, SQL, and Markdown cells among a site's prose and components.++Write a Python cell by adding `marimo` after the fence language:++````markdown+```python marimo+import marimo as mo++mo.md("hello")+```+````++Export an existing marimo notebook to MDX source:++```bash+marimo export md notebook.py -o notebook.mdx --flavor mdx+```++Add `remarkMarimo` to the host's MDX compiler, then load the package stylesheet+and browser runtime. For installation, framework setup, and supported cell+options, see the [mdx-marimo docs](https://marimo-team.github.io/mdx-marimo/).diff --git a/mkdocs.yml b/mkdocs.ymlindex 3b8a39dc88..7f60793618 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -143,6 +143,7 @@ nav:- Jupyter notebook: guides/exporting/jupyter_notebook.md- Quarto: guides/exporting/quarto.md- Jupyter Book: guides/exporting/jupyter_book.md+ - MDX: guides/exporting/mdx.md- Python script: guides/exporting/python_script.md- Markdown: guides/exporting/markdown.md- WebAssembly HTML: guides/exporting/webassembly_html.md