@lincyaw/slidev-addon-exec
v1.0.0-rc.0
Published
Presmium plugin: run panels for code, step-by-step execution and recorded outputs; Python in the browser with Pyodide
Readme
@lincyaw/slidev-addon-exec
Running code: run panels, step-by-step execution and recorded outputs; Python in the browser with Pyodide, offline too.
Part of Presmium, which turns lectures written in MyST Markdown into web pages, slides, Jupyter notebooks and narrated lectures.
Install
pnpm add -D @lincyaw/slidev-addon-execList it in the headmatter of the documents that use it:
plugins:
- '@lincyaw/slidev-addon-exec'It is a Presmium plugin and a Slidev addon: its components work on the web page and in the slides. It needs @lincyaw/cli and the renderers in the same project, and declares the Presmium packages it shares with them as peer dependencies (Presmium 1.x).
What it provides
{run-panel}: a panel that runs code with parameters, at build time and in the browser.{step-run}: Python traced line by line in the browser, a line per step.- Run buttons for code blocks with
:run: liveorboth, and the browser executors.
Configuration
presmium.exec.timeoutMs: the timeout of runs (per section with {config}).
Documentation
- Author guide (Chinese:
site/guide/lecture.md) - Directive reference (Chinese): every directive with its options and an example
License
Apache-2.0
