Skip to main content

Configuration

MD-Slides applies configuration in priority order — highest wins:

  1. CLI flags — --theme dark
  2. Project config — .mdslides/config.json committed with your deck
  3. Global config — ~/.mdslides/config.json for personal preferences
  4. Built-in defaults — light theme, images copied, accessibility checks on

Project config​

Commit .mdslides/config.json next to your deck to set defaults for everyone working on it. MD-Slides also finds it in a parent folder.

{
"theme": "dark",
"outputDir": "dist",
"footer": "{{title}} · {{pageNumber}} / {{totalPages}}",
"breakScreen": "images/break.png"
}
FieldMeaning
themeTheme name (see Themes)
outputDirWhere the rendered presentation goes
copyImagesfalse to skip copying images
skipAccessibilitytrue to skip the theme contrast check
accessibilityReportPathWrite the accessibility report to this file
header, footerDeck-wide header and footer, with tokens
breakScreenImage shown in break mode

Unknown fields are rejected, so typos are caught.

Global config​

~/.mdslides/config.json applies to all decks on your machine. Settings go under defaults; paths.themesDir points at a folder of your own themes:

{
"defaults": {
"theme": "light"
},
"paths": {
"themesDir": "/home/me/slides/themes"
}
}

The global file accepts defaults (theme is required there; also copyImages, skipAccessibility, breakScreen), author, and paths. Unknown fields are rejected: a top-level "theme" is reported as an unknown field and ignored.

Viewing active config​

java -jar md-slides.jar config

Shows each config file, whether it was found, the settings it contributes, and the priority order.