Every deckifyr project is three YAML files. This article is a
field-by-field reference for what they contain; for an
install/quickstart walkthrough see
vignette("getting-started"), and for a worked, richer
example see vignette("examples"). The authoritative, always
up-to-date version of this schema is generated straight from the
pydantic models that actually validate it:
deck_schema("design") # or "layouts" / "presentation"Treat this article as the readable tour and
deck_schema()/deckifyr schema as the source of
truth when they disagree – the JSON Schema is generated directly from
the code that validates your file, this article is hand-written.
The three files
| File | Responsibility |
|---|---|
design.yaml |
Slide size, fonts, colors, named text/shape/table styles, defaults, and document furniture (background, status marker, branding, page numbers) |
layouts.yaml |
Reusable named zone geometry, shared across slides |
presentation.yaml |
Slide order and content, metadata, build settings – the file you
actually pass to
deckifyr build/deck_build()
|
presentation.yaml points at the other two by path
(design: {base: design.yaml},
layouts: layouts.yaml, both project-relative). Every one of
the three files starts with an explicit deckifyr: "0.1"
version field – required, and checked against the same supported-
version set regardless of which file it’s in.
Units and coordinates
Every length is an explicit string with a unit suffix:
"0.75in", "18pt", "2.5cm",
"10mm"
(in/pt/cm/mm). A
bare unitless number (0.75 with no suffix) is rejected by
default – pass strict = FALSE to
deck_validate()/deck_build()
(--warn-only on the CLI) to relax this. The coordinate
origin is the slide’s top-left corner: positive x is right,
positive y is down, positive rotation is
clockwise.
How a slide’s elements get merged
A slide names a layout from layouts.yaml
(or layout: null for a freeform slide with no named layout
at all). Each of that layout’s named zones is deep-merged with the
slide’s own entry for that same element id, if it has one:
- Dictionary fields merge recursively (set a
box.widthoverride without having to repeatbox.x/box.y/box.height). - Scalars and lists replace the layout’s value outright when the slide sets them.
- A field the slide’s YAML never mentions is left alone – it does not get clobbered by an empty/default value the way a naive merge would.
A slide may also add elements a layout doesn’t define, or (with
layout: null) supply its elements as a plain
list instead of an id-keyed mapping; every list-form element needs its
own id.
design.yaml
deckifyr: "0.1"
slide:
width: 13.333in
height: 7.5in
background: "#FFFFFF"
safe_area: 0.35in
fonts:
body: Arial
heading: Arial
monospace: Consolas
colors:
text: "#202124"
muted: "#5F6368"
primary: "#2457A6"
accent: "#D14D32"
text_styles:
title: {font: heading, size: 28pt, bold: true, color: primary}
body: {font: body, size: 16pt, color: text}
defaults:
overflow: error
image_fit: contain
rotation: 0slide:width/height/safe_area(a margin the compiler enforces),background(a fallback solid fill) and, optionally,background_gradient(a linear gradient painted as the slide’s own native fill – see below) andbackground_image(painted between the two, viafurniture).fonts: named font tokens (body/heading/monospace, plus any others you add) that atext_stylesentry’sfontfield can reference by name.-
colors: named color tokens. Any color-bearing field elsewhere indesign.yaml(atext_stylesentry’scolor, ashape_styles/table_stylesfill/border, a gradient stop’scolor) accepts either one of these token names or a literal hex value directly – there’s no requirement to route every color through a token.A
colorsentry may also be derived from another one instead of a literal, via a simple HSL-space transform:colors: primary: "#2457A6" secondary: base: primary # a colors: token name, or a literal hex value darken: 0.2 # exactly one of lighten/darken/saturate/desaturate/mix tertiary: base: primary mix: accent # blend toward another token/literal weight: 0.5 # fraction of `mix` blended in (default 0.5); only with `mix`Derivations may chain (a derivation’s
basecan itself be another derivation); a circular chain is a build-time error. This is useful for tints/shades that should stay visibly tied to a brand color rather than drifting out of sync as a separately hand-picked literal would – seeexamples/demo-deck/design.yaml’sprimary-tint(used for a table’s row banding) for a real worked example. text_styles: named styles (font,size,bold,italic,color, plus optionalopacityandtext_transform: uppercase|lowercase|capitalize) that atext/markdown/table/footer element’s ownstylefield selects by name.shape_styles: namedfill(a color/token, or aGradient: 2+{color, position}stops plus anangle,python-pptx’s own convention where 0 = left-to-right and 90 = top-to-bottom),line_color,line_width– selected by ashapeelement’sstyle.table_styles: namedheader_fill/header_text_color/body_fill/band_fill(alternate-row tint)/border_color/border_width– the fill/border chrometext_styleshas no vocabulary for. Atableelement’s ownstylestill governs its typography;table_styleis the separate, optional field for this chrome.defaults: project-wide fallbacks –overflow(error/shrink/clip/continue),image_fit(contain/cover/stretch/none),rotation, plusfooter_height/footer_style/table_stylefallbacks used when an element doesn’t set its own.furniture: optional, off by default.statusconfigures one or more named status/ watermark placements (watermark, or one of the fourcorner_tr/corner_tl/corner_bl/corner_brcorners), each with its ownbox/style/rotation/z_index;brandingis a fixed organization/department label;page_numberis a running{page} / {total}-style label. None of these render unlesspresentation.yamlactually selects them (see below) – configuring a placement indesign.yamldoesn’t turn it on by itself.
layouts.yaml
deckifyr: "0.1"
layouts:
title-content:
elements:
title:
type: text
box: {x: 0.5in, y: 0.4in, width: 12.3in, height: 1in}
style: title
required: true
content:
type: text
box: {x: 0.5in, y: 1.6in, width: 12.3in, height: 5.3in}
style: body
blank:
elements: {}A named mapping of layouts, each an id-keyed mapping of element zones
(see “Element model” below for what a zone/element can contain).
blank – an empty layout with no zones – is a common,
deliberate entry: a slide using it supplies its own elements directly
rather than filling in a named layout’s placeholders.
presentation.yaml
deckifyr: "0.1"
design: {base: design.yaml}
layouts: layouts.yaml
metadata:
title: "Quarterly Review"
status: draft
build:
output: build/deck.pptx
manifest: build/deck.manifest.json
status_indicator: corner-tr # optional: watermark / corner-tr / corner-tl / corner-bl / corner-br / none
slides:
- id: title
layout: title-content
notes: "Open with the headline number before the agenda."
elements:
title: {value: "Quarterly Review"}-
design/layouts: paths to the other two files. -
metadata: free-form deck metadata;status(e.g."draft"/"demo"/"final") also doubles as the status-indicator’s default text (see below). -
build:output(the.pptxpath to write) and optionalmanifest(a JSON build record: input files, resolved elements, warnings). -
status_indicator: which ofdesign.yaml’sfurniture.statusplacements (if any) to render for this build –"watermark", one of the four hyphenated"corner-*"values, or unset/"none"(the default, nothing shown). Selecting a placementdesign.yamlnever configured is a build error, not a silent no-op. -
watermark: the status/watermark text to render, if set; falls back tometadata.statuswhen unset, so a deck doesn’t need the same word typed into both fields. -
slides: each slide has anid, alayoutname (ornullfor freeform), optionalnotes(plain speaker-notes text, not a slide element), andelements(id-keyed to override/add to the layout’s own zones, or a plain list for a freeform slide – see “How a slide’s elements get merged” above).
Element model
Every element (whether defined in a layouts.yaml zone or
a slide’s own elements) shares a common set of fields on
top of its type-specific ones:
| Field | Meaning |
|---|---|
type |
One of text, markdown, image,
shape, group, table,
reportifyr, quarto
|
box |
{x, y, width, height}, explicit units |
rotation |
Degrees, clockwise |
z_index |
Paint order; higher paints on top. Ordinary elements default to
0
|
style |
A text_styles/shape_styles name |
table_style |
A table_styles name (table elements
only) |
fit |
contain/cover/stretch/none
(image elements) |
overflow |
error/shrink/clip/continue
(text overflow policy) |
render_mode |
How a quarto fragment is rendered
(native/png/svg/auto) |
alt_text |
Accessibility text; required on image elements |
center / align
|
Vertical centering, and independent horizontal alignment
(left/center/right) |
remove |
Drop a layout zone entirely for this slide |
required |
Fail the build if this element ends up with no content |
footer_placement |
below/notes/none, for a
reportifyr/{rpfy}:-sourced table
element’s footer |
value (for text/markdown) or
source (for
image/table/reportifyr, a
project- relative path or a {rpfy}:name.ext reportifyr
magic-string reference) supplies an element’s actual content. A
group element nests other elements (including another
group) under its own elements mapping/list; a
shape element’s shape_kind picks from a small
named subset of autoshapes.
See vignette("examples") for
reportifyr/quarto/table elements
exercised end to end, and deckifyr schema presentation for
the exhaustive, generated field list (including which fields are only
valid on which element types).
