Skip to content

feat: HTML and WASM export of Reveal slides - #10703

Draft
peter-gy wants to merge 6 commits into
marimo-team:mainfrom
peter-gy:pgy/slide-export
Draft

feat: HTML and WASM export of Reveal slides#10703
peter-gy wants to merge 6 commits into
marimo-team:mainfrom
peter-gy:pgy/slide-export

Conversation

@peter-gy

@peter-gy peter-gy commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

A notebook configured as slides currently exports as a normal vertical notebook because its saved layout is not part of the exported mount data.

This PR carries the configured layout through static HTML and WebAssembly export, then restores it through the existing layout plugins before cells render. Static HTML opens as a Reveal deck with captured outputs. WebAssembly --mode run opens the same deck and keeps Python-backed controls reactive in the browser.

Both formats preserve slide types, fragments, speaker notes, deck settings, deep links, and code visibility. Ordinary notebooks retain their normal exported shell.

Implementation

  • The CLI, server, in-app, and Pyodide export paths pass the same serialized layout through the existing mount configuration.
  • The frontend holds that layout until notebook cells are available, then lets the selected renderer plugin validate and materialize it.
  • In-app exports flush pending document changes before taking a snapshot. A full save recovers an ambiguous sync failure, and revision ordering prevents a slower auto-export from overwriting a newer file.
  • Exported decks use the existing Reveal renderer for navigation, deep links, code controls, and notes.

Speaker view

Both formats embed speaker notes in the exported HTML, so anyone with the file can read them. Static HTML enables Reveal speaker view with S.

WebAssembly keeps speaker view disabled. Reveal creates the presenter previews by loading the deck twice in iframes, which would start two more Pyodide workers and rerun the notebook independently. Those previews could diverge from the main deck and repeat side effects. Clean support would need passive preview frames supplied by the main runtime, so this change keeps one Pyodide owner per deck. We can consider this as a follow up, but for now the effort-reward ratio seemed poor.

Closes #10682

Resolve configured layouts once and serialize them through static and WebAssembly mount configs so file, HTTP, and Pyodide exports share the same fallback behavior.
Keep serialized layouts pending until cells exist, then validate and materialize them through the existing renderer plugins. Initialize mounted URL state before the first render.
Hide notebook chrome for exported decks, enable static speaker view, and synchronize deep links and code controls across static and WebAssembly startup.
Flush document transactions before layout serialization, recover ambiguous sync failures through an authoritative full save, and prevent older auto-export jobs from committing after newer state.
@peter-gy peter-gy added the enhancement New feature or request label Aug 30, 2026
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deployment failed for project marimo-docs with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: marimo-docs.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@github-actions github-actions Bot added documentation Improvements or additions to documentation bash-focus Area to focus on during release bug bash labels Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding the option to export slides as HTML

1 participant