Transform your PDF presentations into beautiful web slides
Installation β’ Quick Start β’ Features β’ Documentation
Slidef is a CLI tool that converts your PDF presentations into a modern, web-based slide viewer. Perfect for sharing presentations, creating slide archives, or building your own slide hosting platform.
- kciter.so/talks - Personal presentation archive
- π― PDF to Images - Automatically converts PDF slides to high-quality images (WebP, PNG, or JPEG)
- π¦ Optimized File Size - WebP format by default for 60% smaller files while maintaining quality
- π₯οΈ Web Viewer - Beautiful, responsive slide viewer with keyboard navigation
- π₯ Dev Server - Live development server with hot reload
- π Static Export - Generate static sites for easy deployment (GitHub Pages, Netlify, etc.)
- π Subdirectory Deployment - Support for deploying to subdirectories with baseUrl configuration
- βοΈ Slide Management - Edit slide metadata, titles, descriptions, and dates via web UI
- π¨ Theme Customization - Customize colors and fonts to match your brand
npm install -g @slidef/clior using pnpm:
pnpm add -g @slidef/climkdir my-slides
cd my-slides
slidef initThis creates:
my-slides/
βββ slidef.config.json
βββ slides/
βββ .gitignore
slidef import presentation.pdfYour slides will be converted and saved to:
slides/
βββ presentation/
βββ images/
β βββ slide-001.webp
β βββ slide-002.webp
β βββ ...
βββ metadata.json
slidef devOpen http://localhost:3000 to view your slides!
slidef publishYour static site will be generated in the public/ directory, ready to deploy anywhere.
Initialize a new Slidef project in the current directory.
Options:
--title <title>- Set the project title (default: "Slide Presentations")--subtitle <subtitle>- Set the project subtitle
Example:
slidef init --title "My Presentations" --subtitle "Conference talks and workshops"Import and convert a PDF file to slides.
Options:
--name <name>- Custom name for the slide deck (default: PDF filename)--scale <number>- Image resolution scale factor (default: 2)--format <format>- Image format: png, jpeg, or webp (default: webp)--quality <number>- Image quality for lossy formats (0-100, default: 85)
Examples:
# WebP with default quality (recommended)
slidef import talk.pdf --name "my-conference-talk"
# PNG for maximum quality
slidef import talk.pdf --format png
# JPEG with custom quality
slidef import talk.pdf --format jpeg --quality 90Start a development server with live reload.
Options:
--port <port>- Server port (default: 3000)--slides <dir>- Slides directory (default: "slides")
Example:
slidef dev --port 8080Features:
- Web-based slide management (import, edit, delete)
- Live reload on file changes
- Theme preview
Generate a static site for deployment.
Options:
--output <dir>- Output directory (default: "public")--slides <dir>- Slides directory (default: "slides")
Example:
slidef publish --output distThe slidef.config.json file allows you to customize your slide viewer:
{
"title": "My Slide Presentations",
"subtitle": "View and manage your slide decks",
"publishDir": "public",
"slidesDir": "slides",
"theme": {
"primaryColor": "#007bff",
"progressColor": "#A020F0",
"fontFamily": "system-ui, -apple-system, sans-serif"
}
}primaryColor- Primary accent color for buttons and linksbackgroundColor- Background color for the viewertextColor- Primary text colorprogressColor- Progress bar colorfontFamily- Font family for the entire UI
Each slide deck has a metadata.json file with the following structure:
{
"name": "presentation",
"title": "My Awesome Presentation",
"description": "A talk about something interesting",
"pageCount": 42,
"createdAt": "2025-11-05",
"sha256": "abc123..."
}You can edit title, description, and createdAt through the web UI in dev mode.
-
Publish your slides:
slidef publish --output docs
-
Push to GitHub and enable GitHub Pages from the
docsfolder in repository settings.
If your site will be deployed to a subdirectory (e.g., https://username.github.io/my-slides/):
-
Set the baseUrl in your
slidef.config.json:{ "baseUrl": "/my-slides" } -
Publish your slides:
slidef publish --output docs
-
Push to GitHub and enable GitHub Pages from the
docsfolder in repository settings.
-
Publish your slides:
slidef publish
-
Deploy the
public/directory using Netlify or Vercel.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.