Skip to content

Peitho deck format

A deck is one Markdown file (CommonMark + GitHub Flavored Markdown: tables, task lists, strikethrough, autolinks).

Frontmatter

An optional YAML block at the very top:

---
title: My talk          # browser title; defaults to the first heading
author: Jane Doe
theme: agora            # built-in name or path to a theme folder
lang: en                # <html lang>
brand:                  # optional overrides on top of the theme
  primary: "#0B5FFF"
  accent: "#14A37F"
  font: Inter
  logo: ./assets/logo.svg   # shown on every slide
---

Slides

Slides are separated by a line that contains only ---. A --- inside a fenced code block is not a separator.

Directives

HTML comments at the top of a slide configure it:

Directive Example Effect
layout <!-- layout: two-cols --> named layout (see below)
id <!-- id: results --> stable slide id, used in links (#results) and in element ids
class <!-- class: dense --> extra CSS classes for themes
image <!-- image: ./photo.jpg --> side image for image-right

A heading with an explicit id, # Results {#results}, also sets the slide id when no id directive is given. Otherwise the id is derived from the first heading (## Why Peitho? becomes why-peitho), or slide-N.

Layouts

Layout Use
default title and content
cover first slide: big title and subtitle
section section divider
two-cols headings span both columns; put ::right:: on its own line to start the right column
image-right text on the left, the image directive fills the right half
quote a blockquote, then the attribution
big-number a huge # heading (a figure) and a caption
center everything centered

Speaker notes

<!-- notes:
Anything in Markdown. Shown with the **N** key.
-->

Images

Markdown images with a local path are embedded in the HTML as data URIs. Remote images (https://...) are kept as links and reported by peitho lint, because the deck would then need network access.

Element ids (data-sid)

Every top-level block of a slide is wrapped in an element with a data-sid attribute:

<slide-id>.<kind><n>

where kind is h (heading), p (paragraph), list, quote, code, table, img, hr or html, and n counts that kind inside the slide. A heading with {#name} gets <slide-id>.<name>.

Counting per kind keeps ids stable when text changes or when a block of another kind is added. Give slides an explicit id so that reordering slides or renaming titles does not change them. These ids are what review comments will anchor to.

Raw HTML

Raw HTML is allowed (decks are trusted content), but peitho lint warns about inline colors, fonts and <style> blocks: put styling in a theme so that switching themes keeps working.