MkDocs marimo plugin
Project description
MkDocs marimo Plugin
[!WARNING] The MkDocs marimo plugin is under active development. Features and documentation are being continuously updated and expanded.
This plugin allows you to embed interactive marimo notebooks in your MkDocs documentation.
Installation
# pip
pip install mkdocs-marimo
# uv
uv pip install mkdocs-marimo
# pixi
pixi add mkdocs-marimo
Usage
Create reactive and interactive Python blocks in your markdown files using marimo.
Embedding inline Python code and marimo elements
This uses code fences to embed marimo components as marimo islands.
```python {marimo}
import marimo as mo
name = mo.ui.text(placeholder="Enter your name")
name
```
```python {marimo}
mo.md(f"Hello, **{name.value or '__'}**!")
```
Embedding the marimo playground
For an easy way to embed marimo notebooks or applications, we recommend embedding the marimo playground. This feature uses pymdownx.blocks to embed marimo notebooks in your MkDocs documentation, creating iframes that render the marimo playground.
/// marimo-embed
height: 400px
mode: run
```python
@app.cell
def __():
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.figure(figsize=(8, 4))
plt.plot(x, y)
plt.title('Sine Wave')
plt.xlabel('x')
plt.ylabel('sin(x)')
plt.grid(True)
plt.gca()
return
```
///
Available options for marimo-embed:
height: Named sizes (small,medium,large,xlarge,xxlarge) or custom pixel values (e.g.500px) (default: medium)mode: read, edit (default: read)app_width: wide, full, compact (default: wide)
You can also embed marimo files directly:
/// marimo-embed-file
filepath: path/to/your/file.py
height: 400px
mode: read
show_source: true
///
Additional options for marimo-embed-file:
filepath: path to the marimo file to embed (required)show_source: true, false (default: true) - whether to show the source code below the embed
Examples
Checkout the documentation for more examples.
Contributions welcome
Feel free to ask questions, enhancements and to contribute to this project!
See CONTRIBUTING.md for more details.
Credits
- Repo template from mkdocs-static-i18n
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_marimo-0.2.1.tar.gz.
File metadata
- Download URL: mkdocs_marimo-0.2.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e4cf8005b79856beb3e9db48e7c8fa7f94a5d00c05aa6877f44a173c0ec9bb0
|
|
| MD5 |
3bcb793e4a3f7d6352a671d25025b9bf
|
|
| BLAKE2b-256 |
5a560bf393acdbfddc18f21124837529c0bee627988a6522abaa35a0a92d1bb6
|
Provenance
The following attestation bundles were made for mkdocs_marimo-0.2.1.tar.gz:
Publisher:
build.yml on marimo-team/mkdocs-marimo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_marimo-0.2.1.tar.gz -
Subject digest:
9e4cf8005b79856beb3e9db48e7c8fa7f94a5d00c05aa6877f44a173c0ec9bb0 - Sigstore transparency entry: 184434725
- Sigstore integration time:
-
Permalink:
marimo-team/mkdocs-marimo@088370a2ca38aa2230a265901d70fec9c46a3665 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/marimo-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@088370a2ca38aa2230a265901d70fec9c46a3665 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_marimo-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mkdocs_marimo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f73bd5c8ccd15258266d201a7f65a451563018c01e9cabae0aaa112e0a1152
|
|
| MD5 |
3ddc0abef98e4e24f4c6c4c5a7b26a2e
|
|
| BLAKE2b-256 |
049c2f1a7903d5a041b7e249bf24ec745d933c3976749a96687675876a0f83e9
|
Provenance
The following attestation bundles were made for mkdocs_marimo-0.2.1-py3-none-any.whl:
Publisher:
build.yml on marimo-team/mkdocs-marimo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_marimo-0.2.1-py3-none-any.whl -
Subject digest:
96f73bd5c8ccd15258266d201a7f65a451563018c01e9cabae0aaa112e0a1152 - Sigstore transparency entry: 184434732
- Sigstore integration time:
-
Permalink:
marimo-team/mkdocs-marimo@088370a2ca38aa2230a265901d70fec9c46a3665 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/marimo-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@088370a2ca38aa2230a265901d70fec9c46a3665 -
Trigger Event:
push
-
Statement type: