From d353c0719494fa5f53e4f7b8b4b8ee3cbeb8da0d Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Sun, 11 Oct 2026 17:51:27 -0500 Subject: [PATCH] Gallery: an Open in Workbench button on each demo page The direct-MicroPython demo page now links the example it is showing to Workbench (?vm=1&example=), which opens it there in the simulator with the entry file in the editor, ready to edit, run, or put on a board. --- .site/gallery/micropython.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.site/gallery/micropython.html b/.site/gallery/micropython.html index 4b5ea9381..fe6a83427 100644 --- a/.site/gallery/micropython.html +++ b/.site/gallery/micropython.html @@ -21,6 +21,7 @@

Direct MicroPython WebAssembly

Pyodide alternative +

The application runs on the main thread through the compiled _wasm_bridge.

@@ -58,6 +59,11 @@

Console output

if (entry) { document.getElementById('loader-title').textContent = entry.replaceAll('_', ' '); document.title = `${entry} — Direct MicroPython`; + // The same example in Workbench: editable, runnable in its + // simulator, and one connect away from a board. + const workbench = document.getElementById('workbench-link'); + workbench.href = `https://pydevices.github.io/workbench/?vm=1&example=${encodeURIComponent(entry)}`; + workbench.hidden = false; }