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.9.0. These pages describe
go-slides/slides v0.9.0
and are published under
/docs/0.9/.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 — as vectors since v0.4.0, its text selectable: Vector PDF |
| 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 (since v0.4.0) |
slides build --pptx | the deck as a PowerPoint file with its speaker notes and the deck’s metadata: one picture per slide in v0.4.0, as in marp-cli; editable since v0.5.0 — text boxes, shapes, pictures, fonts embedded (Editable PPTX and ODP) |
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: formulas as vectors in the PDF (they are bitmaps there). 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
- Getting started
- Gallery: twelve example decks, to open in the playground
- Marp compatibility
- Templates
- Kinds
- HCL
- Math and code
- Emoji
- Command line
Created on by tannevaled
Modified on by tannevaled