Quick Start
This guide takes you from a new folder to a working presentation. If you already have a Slidev project, skip to adding the theme. For an editor-based workflow, see the VS Code extension.
1. Prepare the environment
Use Node.js 24 LTS and pnpm 10. Check your versions:
node --version
pnpm --versionInstall pnpm if needed:
npm install -g pnpm@10The current Slidev/Vite toolchain requires Node.js ^20.19.0 || >=22.12.0; an early Node 20 or 22 release is not enough. Node 24 is the recommended starting point. See the Vite requirements and Node.js release schedule.
2. Create the project
Start with the academic template, which includes a bibliography:
npx -y slidev-theme-scholarly init my-talk --template academic
cd my-talk
pnpm installThe CLI creates slides.md, package.json, a README, and, for citation templates, references.bib. It refuses to overwrite a nonempty folder.
To choose another template, run npx -y slidev-theme-scholarly template list. Academic Workflows explains which templates suit paper talks, defenses, reviews, results talks, and lectures.
3. Preview and write
pnpm run devKeep this terminal running. The browser opens automatically and updates when you save slides.md.
The first YAML block contains deck settings. Later blocks set options for individual slides; --- separates pages:
---
theme: scholarly
lang: en
---
# Presentation title
The main idea
---
layout: section
---
# MethodsA layout arranges a whole slide. A component adds content such as a theorem or metric inside that layout. Keep blank lines around Markdown inside Vue component tags.
4. Add content
Use the CLI to browse the available building blocks:
pnpm exec sch layout list
pnpm exec sch component list
pnpm exec sch snippet listAppend a theorem snippet to the end of slides.md:
pnpm exec sch snippet append theorem --file slides.mdsnippet append adds content at the end of the file; it does not target the editor cursor or necessarily create a new slide. workflow apply appends a sequence of snippets to the deck. Inspect the result before adding another workflow:
pnpm exec sch workflow list
pnpm exec sch workflow apply paper --file slides.mdTheme commands update the first YAML block:
pnpm exec sch theme preset apply oxford --file slides.md5. Check and export
Run the project check and review its suggested fixes:
pnpm exec sch doctorFix ERROR items and review relevant WARN items. The doctor checks setup and citation metadata; inspect the rendered slides for overflow, missing images, and readable text.
Export a PDF
CLI export needs Playwright and Chromium. Install them once in the presentation project, then export:
pnpm add -D playwright-chromium
pnpm exec playwright install chromium
pnpm run exportThe terminal prints the PDF path. If installing a browser is inconvenient, use Slidev's Export page in a Chromium-based browser. See Slidev exporting for PNG, PPTX, ranges, and export options.
Build a website
pnpm run buildThis writes a static site to dist/. Upload that directory to a static host to publish it. When hosting under a subpath, set Slidev's --base option as described in Slidev hosting.
Add Scholarly to an existing Slidev project
pnpm add -D slidev-theme-scholarlySet theme: scholarly in the first YAML block of slides.md, preserving its other settings. Continue using your project's preview and build commands. Check the upgrade notes when updating Slidev at the same time.
Citations are loaded by the theme, so no project-level vite.config.ts is needed. Follow Citations to add a BibTeX file and reference page.
Optional global CLI
Inside a project, pnpm exec sch uses that project's installed theme version. For use outside a project, either use the npx -y slidev-theme-scholarly form above or install globally:
npm i -g slidev-theme-scholarly
sch help