Cantrip

One Markdown file in. A slideshow and a PDF out.

1 / 12

The format is just Markdown

Slides are separated by a line of three dashes. Everything else is ordinary Markdown, so the file still reads as a document.

2 / 12

Front matter sets the deck up

---
title: Cantrip
author: mplx
theme: grimoire-dark
ratio: 16:9
transition: slide
---

A --theme, --ratio, or --transition on the command line overrides the file.

3 / 12

Lists and tasks

4 / 12

Tasks and tables

OutputCommandDefault name
HTMLcantrip html talk.mdtalk.html
PDFcantrip pdf talk.mdtalk.pdf
Bothcantrip build talk.mdboth of the above
5 / 12

Code reads as code

use io;

func greet(name as string) {
    io.printf("hello, %s\n", $name);
}

greet("ada");

Fenced blocks keep their language, so the HTML carries a class="language-jennifer" for a highlighter to pick up.

6 / 12

Callouts

Note

A blockquote that opens with an alert marker becomes a callout.

One slide, one page

A slide that outgrows its page continues onto the next, and the tool says so.

7 / 12

Themes that match your manual

Cantrip ships the ten themes of the Grimoire book builder under their own names, each light and dark, so a talk can wear the look of its docs:

In grimoire.tomlIn the deck
theme = "grimoire"theme: grimoire or theme: grimoire-dark
theme = "nordic"theme: nordic or theme: nordic-dark
theme = "terminal"theme: terminal or theme: terminal-dark

cantrip themes lists all 24. The manual this deck comes with wears obsidian, so a talk beside it would wear obsidian or obsidian-dark.

8 / 12

Transitions

The slideshow animates between slides. This deck asks for slide:

Tip

A viewer whose system asks for reduced motion gets no animation at all.

9 / 12

Speaker notes

Notes live in an HTML comment, so every other Markdown renderer ignores them:

<!-- notes: what to say here, and what to skip -->

Press s in the slideshow to see them. Pass --notes to print them into the PDF.

10 / 12

Driving the slideshow

KeyDoes
Right Spacenext slide
Leftprevious slide
ooverview
sspeaker notes
ffullscreen
?every shortcut
11 / 12

Thank you

The source of this deck is examples/sample.md.

12 / 12