a post with marimo snippets
marimo notebooks can run Python directly in the reader’s browser. Opt a page in from its front matter:
---
layout: post
title: a post with marimo snippets
marimo: true
---
Nothing is loaded on pages without that flag, so bundling the plugin costs nothing site-wide.
Runnable snippets
Wrap fenced Python blocks in a container and the runtime turns them into an interactive notebook after the page loads:
import marimo as mo
slider = mo.ui.slider(1, 20, value=5, label="n")
slider
mo.md(f"The first {slider.value} squares: {[i**2 for i in range(1, slider.value + 1)]}")
Until the runtime has moved those blocks into place the container stays hidden, so readers never see the raw source flash before it becomes a notebook.
Embedding a hosted notebook
If you already publish a notebook — on marimo.app or your own WASM host — embed it instead:
{% al_marimo_embed src="https://marimo.app/l/your-notebook" height="700px" caption="Sampling demo" %}
The frame is sandboxed without allow-same-origin, so the embedded notebook cannot reach this page’s storage or cookies.
A note on what this loads
The marimo-snippets runtime is vendored into the plugin at a pinned version and served from your own site, rather than pulled from a CDN — so no third-party origin executes script in your readers’ pages. Running a notebook does contact marimo’s host, which is worth knowing before you opt a page in.
Enjoy Reading This Article?
Here are some more articles you might like to read next:
- Security Data Analytics — 06 — Visual Analytics
- Security Data Analytics — 07 — Text Analytics
- Security Data Analytics — 08 — File, Image and Video Analytics
- Security Data Analytics — 09 — Future Research Directions
- AI for rapid prototyping in education
- Part 1: Quick setup of a Virtual Machine in a Web Browser using Kasm and Docker
- More Fun with Kasm and Docker: Quickly spin up x86-based Ubuntu or Kali on macOS
- Wazuh, Ubuntu, Kali, Caldera — a super quick way of building a disposable cyber lab
- Hacking the HDMI airwaves — side channel attacks to recover a target display (Part 1)
- How “Vibe Coding” is changing the game (or, How AI got a busy me back into software development)