Exporting to PDF or PNG relies on Playwright for rendering. You will therefore need to install
playwright-chromiumto use this feature. If you are doing exporting in a CI environment, the playwright CI guide can be helpful.
$ npm i -D playwright-chromium
Now export your slides to PDF using the following command
$ slidev export
After a few seconds, your slides will be ready at
In case you want to export your slides using the dark version of the theme, use the
$ slidev export --dark
Export Clicks Steps
Available since v0.21
By default, Slidev exports one page per slide with clicks animations disabled. If you want export slides with multiple steps into multiple pages, pass the
$ slidev export --with-clicks
When passing in the
--format png option, Slidev will export PNG images for each slide instead of a PDF.
$ slidev export --format png
Single-Page Application (SPA)
See Static Hosting.