Skip to content

deck.config.ts

Every option in a deck's configuration file.

Use this page to check a field of decks/<deck>/deck.config.ts, the file that names a deck, lists its slides in order and picks its brand. How a deck and its slides fit together is on decks and slides.

The file

The file default-exports a call to defineDeck from @deckster/engine/config. This is the hello deck’s:

import { defineDeck } from '@deckster/engine/config';

/**
 * The sample deck: one slide of each kind the engine supports, one per brand surface. Change
 * `brand` to "nocturne" to restyle every slide.
 */
export default defineDeck({
  title: 'Hello, deck',
  brand: 'default',
  slides: ['title', 'steps', 'live-counter', 'closing'],
});

defineDeck returns its argument unchanged and types it; the build checks the object against the schema below. deck new <deck> writes this file for you with title, brand and slides, and duration when you pass --duration.

Fields

FieldTypeDescription
titlerequiredstring (non-empty)The deck's title, any non-empty text.
slidesrequiredstring[] (at least 1)The slide ids in presentation order. Each id names slides/<id>.mdx or slides/<id>.tsx, without the extension, in kebab-case.
brandstringThe folder under brands/ the deck renders in, in kebab-case. --brand <name> overrides it for one run. Default default.
mouseNavigationbooleanfalse stops left and right clicks from moving the deck; keys still work. Default true.
durationstringThe length of the talk in minutes and seconds (20m, 90s, 1m30s). The presenter window paces against it and time-budget checks the slide budgets against it.

deck-config.json

Slide ids and the brand name are kebab-case: lowercase letters and digits joined by single hyphens (request-flow). A duration goes up to 999 minutes. How a brand is picked and overridden is on use a brand; how the presenter window and deck lint use duration is on speaker notes.

Any other key is an error: the object takes these five and nothing else.

Errors

deck lint and the build name the file, the field, what was wrong and the fix. A duration written in words:

$ deck lint launch-review
decks/launch-review/deck.config.ts
  error   schema: duration: Expected a duration such as "90s", "20m" or "1m30s", got "20 minutes".
          Fix: Write the talk length as minutes and seconds, for example `duration: 20m` or `90s`.

launch-review: 1 error, 0 warnings.

A key the schema does not know:

$ deck lint launch-review
decks/launch-review/deck.config.ts
  error   schema: "theme" is not a deck config field.
          Fix: Remove it. Known fields: title, slides, brand, mouseNavigation, duration.

launch-review: 1 error, 0 warnings.

Type to search…

↑↓ navigate↵ selectEsc close