On this page ▾
Syntax
A deck is one markdown file. Everything else in this guide is a feature you switch on from inside it.
Slides
A line with only --- separates slides. A block of YAML between two --- lines at the top of a slide is that slide's frontmatter.
---
title: My talk
---
# First slide
---
layout: center
class: text-red-500
---
# Second slide
The frontmatter of the first slide is the headmatter. It describes the whole deck: title, theme, transition, export settings, and so on. The keys of both are in Headmatter and frontmatter.
If you set nothing, the first slide uses the cover layout and every other slide uses default.
Notes
The last HTML comment of a slide is its speaker note. It is stored with the slide and shown in the presenter view, never on the slide.
# Slide
<!-- This text is a note. -->
Slots
A line with only ::name:: starts a named part of the slide, which a layout can place somewhere:
---
layout: two-cols
---
# Left, the default part
::right::
# Right
See Slots.
Importing slides
src: in a slide's frontmatter replaces the slide with the slides of another file. See Importing slides.
Per-slide styles
A <style> block in a slide applies to that slide only. See Scoped styles.
Code and math
Fenced code is highlighted while the deck is generated. Math uses $...$ and $$ ... $$. Diagrams are mermaid and plantuml fences. Pages for each: Code, Diagrams and math.
Angular syntax
Interpolation, control flow and your own components work in a slide. Read Angular in markdown for the few rules that keep the markdown converter from breaking your template.
Formatting the file
slide-ng format tidies spacing and rewrites the frontmatter as clean YAML. See Formatting.