Export
One command
Section titled “One command”bunx astlide export my-talk # → exports/my-talk.pdfbunx astlide export my-talk --pptx # → exports/my-talk.pptx (editable PowerPoint)bunx astlide export my-talk --png # → exports/my-talk-slides/*.pngbunx astlide export --all --pdf --pptx # every deck, both formatsProjects created with bun create astlide also have it as a script: bun run export my-talk --pptx.
A deck can also be given as a path (src/content/decks/my-talk, dist/my-talk, …); the project is found from it, as it is when you run the command in any folder inside the project.
- PDF / PNG are rendered in a headless browser (Playwright; run
bunx playwright install chromiumonce).astlide exportbuilds your site and serves it on a free port for the export, so there’s no server to start, and Astro’sbaseis picked up automatically. Every slide is shown in its final state (all fragment / code steps applied), and diagrams finish rendering first. - PPTX needs no browser: the built slides are laid out by Astlide’s own CSS layout engine and written as native shapes and editable text boxes. The fonts your theme loads are embedded in the file, so PowerPoint shows the slides in them without the fonts installed (fonts whose license forbids embedding are left out). Tables become PowerPoint tables, and boxes, CSS
::before/::aftertext and simple inline SVG drawings (rectangles, circles, lines and arrows, paths, text) become shapes you can edit. Mermaid diagrams are rendered without a browser too (the project’smermaidinstall) and placed as pictures, as are SVG drawings that use more than that (gradients, arcs …); PNG and SVG images are included. Speaker notes go into PowerPoint’s notes pane. Japanese (and other East Asian) text is given an East Asian font — the CJK font your CSS names, else Yu Gothic, which comes with Office — and is laid out with a Japanese font, so lines break as in the browser.
| Option | |
|---|---|
--pdf --pptx --png |
Formats, combine as needed (default --pdf) |
--all |
Every deck |
--out-dir <dir> |
Where exports go (default exports/) |
-o, --output <path> |
Exact output path (one deck, one format) |
--no-build |
Use the existing dist/ instead of building first |
--base-url <url> |
PDF / PNG: render from a dev / preview server you already run (include the base, e.g. http://localhost:4321/my-repo) |
--width / --height |
PDF / PNG: slide size in px (default 1920×1080) |
If astro dev is running for the same project, pass --base-url so a PDF / PNG export doesn’t build alongside it.
In-browser PDF (experimental)
Section titled “In-browser PDF (experimental)”Add "download" to the toolbar for a one-click PDF of the current deck. It uses the optional, pre-1.0 @astlide/crispdf, whose output may still change — prefer the CLI for stable results.
bun add -D @astlide/crispdf