interactive demo
this page demonstrates the runnable script feature.
canvas animation
how it works
the !run[[script.js]] syntax embeds a canvas element and loads the specified script as an ES module. the script must export a run(canvas) function.
javascript
// content/demo.js (co-located with demo.md)
export function run(canvas) {
const ctx = canvas.getContext('2d');
// draw stuff...
}