Quickstart
Quickstart
Section titled “Quickstart”This guide shows the intended public npm workflow for Slida.
It assumes @slida/cli is available from npm and provides the slida binary.
Install the CLI
Section titled “Install the CLI”Install Slida in your deck project:
npm install -D @slida/cliCreate a slides/ directory:
mkdir -p slidesCreate a deck
Section titled “Create a deck”Create slides/deck.mdx:
---title: My first Slida deck---
# My first Slida deck
A slide deck authored with MDX.
---
# A content slide
- Write slides in Markdown.- Split pages with horizontal rules.- Add a layout declaration when you need a specific theme layout.MDX decks start a new page at each horizontal rule (---).
If you omit a layout declaration, the first page uses the cover layout and later pages use the default layout.
Preview the deck
Section titled “Preview the deck”Start the local preview server:
npx slida open slides/deck.mdxUse --host, --port (or -p), and --open when you need to change the local server behavior:
npx slida open slides/deck.mdx --port 4321 --openBuild static HTML
Section titled “Build static HTML”Build the deck as static HTML and assets by selecting the html output format:
npx slida build slides/deck.mdx --format htmlThe default HTML output directory comes from the deck filename, so slides/deck.mdx builds to deck/.
Use --out to choose a different directory:
npx slida build slides/deck.mdx --format html --out public-deckExport a PDF
Section titled “Export a PDF”Build the deck as a PDF. PDF is the default slida build output format:
npx slida build slides/deck.mdxThe default PDF filename comes from the deck filename, so slides/deck.mdx exports deck.pdf.
Use --out to choose a file and --force (or -f) to overwrite an existing PDF without an interactive prompt:
npx slida build slides/deck.mdx --format pdf --out slides.pdf --forceNext steps
Section titled “Next steps”Read Deck authoring to learn the difference between .astro and .mdx decks, how layouts are selected, and how named slots work.