Reference

Configuration

Configure the Drever entry, canvas, theme, server, build, rehearsal, focus tools, Stage, and plugins.

Start with one small config

Drever can preview and check a deck without drever.config.ts, but web builds and PDF exports require deck.lang. A generated project includes a small typed file so its published language is explicit from the first build. The title follows the first slide until the author chooses a separate published title. Expand that file only when the presentation needs a description, sharing metadata, different entry, canvas, theme, development server, build output, rehearsal target, focus tools, Stage, or plugin plan.

ts
import { defineConfig } from "drever";

export default defineConfig({
  entry: "talk.mdx",
  deck: {
    title: "Choose what happens next",
    description: "The evidence, tradeoffs, and one decision the room can act on.",
    lang: "en",
    dir: "ltr",
    url: "https://slides.example/keynote/",
    icon: "./icon.svg",
    social: {
      image: "./social-cover.png",
      imageAlt: "Presentation cover",
    },
  },
  canvas: { width: 1600, height: 900 },
  server: { port: 4317, open: true, strictPort: true },
  build: { outDir: "dist", sourcemap: false },
  rehearsal: { targetDurationMinutes: 20 },
  focusTools: {
    laser: { color: "#c7f03a" },
    pen: { color: "#5b45d8", width: 7 },
    highlighter: { color: "#ffe66d", opacity: 0.28, width: 30 },
  },
  stage: {
    background: "./StageBackground.tsx",
    foreground: "./StageChrome.tsx",
  },
});

Every key is typed and validated. Unknown settings fail with a precise config diagnostic instead of being forwarded to Vite.

Configuration reference

SettingPurpose
entryMDX entry path. The zero-config default is slides.mdx.
deckDocument title, description, language, direction, icon, and social preview image.
themeOne Drever theme definition. See the theme guide.
canvasPositive integer width and height values for the authored surface.
serverCurated development options: host, open, port, and strictPort.
buildStatic outDir and optional source-map mode.
rehearsalPositive targetDurationMinutes used by Speaker View pacing.
focusToolsLaser, Pen, and Highlighter colors, widths, and Highlighter opacity.
stageBackground and foreground React module paths for persistent presentation layers.
pluginsOrdered plugin definitions or typed registrations. See plugins.

Entry, build, and Stage module paths resolve from the project root. Keep Stage modules deterministic across Audience, Speaker, Document, and PDF surfaces.

Set deck.lang to the presentation's BCP 47 language tag, such as en, zh-CN, or ja. This language reaches the initial HTML document, tagged PDF export, assistive technology, and the official themes' locale-aware typography. deck.dir accepts ltr, rtl, or auto. A development preview without deck.lang declares the document language as und instead of making an unsafe guess; web builds and PDF exports require an explicit language. When deck.title is omitted, a production build uses the first slide's static title. Description and social image metadata remain optional. deck.url is the presentation's canonical public HTTPS URL and ends with /. Put local icon and social image files in public/ and reference them with ./ URLs. Drever validates those files, and uses deck.url to turn a local social image into the absolute URL required by link-preview crawlers. Configure a social image and its concise alternative text together. An already hosted social image can use its absolute HTTPS URL directly.

Keep the public surface small

Presentation authors should not need to understand the Vite, Remark, or Rehype configuration graphs. Drever exposes the common project controls above. Plugin developers can contribute those lower-level integrations through the typed plugin descriptor without turning them into global user configuration.

Run npm exec -- drever doctor --json when the local toolchain or browser installation is in doubt. Run npm exec -- drever context --json to inspect the fully resolved canvas, theme, plugins, slides, and Step stops that the compiler will use. Both commands resolve the Drever version installed in the current project.

NextCredits

Meet the people, projects, and open-source foundations behind Drever.