Layout
Use _layout as the primary directive for all slide appearance. Use _class only for custom CSS that doesn’t map to a built-in layout.
Available layouts
| Layout | Use case |
|---|---|
default |
Standard slide |
lead |
Title slide |
big |
One strong statement or metric |
quote |
Quote plus attribution |
left |
Left-aligned content |
right |
Right-aligned content |
columns-2 |
Two flowing columns (CSS columns, no divs needed) |
columns-3 |
Three flowing columns |
cols |
Two explicit side-by-side panels (use ::: col) |
split |
Narrow left + wide right panels (use ::: col) |
timeline |
Horizontal timeline layout |
fit |
Compact sizing for dense content |
invert |
Dark background, light text |
Note:
two-columnsis a deprecated alias forcols. Usecolsin new slides.
Example: lead
<!-- _layout: lead -->
# Dorcs
Markdown docs and slides in one place
Example: cols
<!-- _layout: cols -->
::: col
## Problem
Too many disconnected docs.
:::
::: col
## Solution
One Markdown source for docs and decks.
:::
Example: split
<!-- _layout: split -->
::: col
## Context
Narrow panel, 1fr.
:::
::: col
## Detail
Wide panel, 2fr. Main content goes here.
:::
Example: auto columns
Content after the heading flows automatically into columns. Put section sub-headings (###) directly after the slide title — no intro paragraph between them.
<!-- _layout: columns-2 -->
## Key Points
### What it does
Content flows into the left column automatically.
### How it works
CSS multi-column balances the remaining content.
Combining layout and class
Pass space-separated values to _layout to combine a layout with extra classes:
<!-- _layout: lead invert -->
This is equivalent to _layout: lead + _class: invert.