Skip to main content

Module render_slides

Module render_slides 

Source
Expand description

Presentation deck rendering — Slides as a first-class SurfDoc output type.

This mirrors the ::site/::page website path in crate::render_html: a ::deck/::slide block family is extracted into a DeckConfig plus a list of SlideEntry, then rendered to a single self-contained HTML file using the canonical surf-dark reference theme (the shell ported from decks/surf-platform-pitch.html — top progress bar, keyboard/click/touch nav, fullscreen).

Slide content reuses the existing block renderers ([render_block]) and the bundled crate::SURFDOC_CSS, so a slide is an arrangement of blocks that already exist — no new content primitives. The deck chrome is layered on top.

When a document has neither a ::deck nor any ::slide, every #/## heading boundary becomes a slide (Presentation Mode), so any SurfDoc is already a deck with zero edits.

Structs§

DeckConfig
Deck-level configuration extracted from a ::deck block (peer of crate::SiteConfig).
SlideEntry
A single slide extracted from a ::slide block (or an auto-split section).

Functions§

extract_deck
Extract deck config and slide list from a parsed SurfDoc.
render_deck_html
Render a deck config + slide list into a single standalone HTML file.
to_slides_html
Render a parsed SurfDoc as a complete, self-contained HTML deck.