go-slides documentation
You are reading the documentation of an outdated version, whose text may no longer be accurate. Go to the latest version.
slides turns a Marp deck into a presentation, in pure Go. It reads the
Markdown Marp reads — Marpit’s directives, --- between
slides, ![bg] backgrounds, speaker notes, the default, gaia and
uncover themes — and adds two things Marp does not have:
- Go templates inside the deck, evaluated before the Markdown is parsed, so a deck can generate its own slides;
- slide kinds: a slide says what it is
(
title,section…) instead of repeating how it looks.
v0.3.0. These pages describe
go-slides/slides v0.3.0
and are published under
/docs/0.3/.What it does today
slides build (the default) | the deck as one HTML page: each slide an SVG-framed <section> that scales to the window, the theme’s CSS, a keyboard viewer |
slides build --pdf, --images png, --image jpeg | the deck as a PDF (one page per slide, with an outline) or as PNG/JPEG images, with no browser: go-webengine renders, go-pdfkit writes the PDF. Known limit applies |
| math and code | $…$ and $$…$$ typeset by go-tex/math, fenced code highlighted by go-rouge, in HTML, images and PDF: Math and code |
| emoji | :smile: and 😄 become Twemoji images, embedded, so they need no network and draw in every output: Emoji (after v0.3.0) |
slides build --pptx | the deck as a PowerPoint file: one full-slide picture per slide, with its speaker notes and the deck’s metadata (not editable text, as in marp-cli) |
slides build --odp | the same as an OpenDocument presentation (.odp) |
| fitting headings | # <!-- fit --> Title fills the slide width on one line, in the page and in every export |
slides expand | the deck as plain Marp Markdown: templates evaluated, kinds replaced by the spot directives they stand for |
slides notes | the speaker notes |
slides kinds, slides themes | what a deck can name |
slides.yaml | shared kinds, themes, data, HTML policy and language for a folder of decks |
| HCL | ---hcl front matter, slides.hcl, kinds and data files in HCL2, with expressions and functions: HCL |
Planned
Not built yet, and listed so nobody has to guess: a vector PDF (a PDF holds one image per slide today). The difference with marp-cli is the route: it renders images and PDF by driving a headless Chrome; here that is done by Go libraries.
Pages
Created on by tannevaled
Modified on by tannevaled