A comprehensive CLI tool for managing and building multiple Reveal.js presentations with shared themes and resources.
RevealPack is designed for creating suites of presentations that share themes and resources, such as lecture series, multi-day seminars, or training programs. It abstracts the slide deck creation process while providing complete control over individual slides or groups of slides within each presentation.
- Multi-Presentation Management: Create and manage multiple presentations from a single project
- Shared Resources: Common libraries, themes, and assets across all presentations
- Flexible Content: Support for HTML, Markdown, and mixed content slides
- Live Development: Real-time preview with automatic rebuilds on file changes
- Theme Compilation: SCSS/SASS support with Dart Sass compilation
- Plugin Management: Built-in and external plugin support with automatic downloading
- Distribution Ready: Package presentations for standalone distribution
- Customizable: Extensive configuration options for themes, plugins, and presentation settings
- Print Control: Enhanced print functionality with
print-invisibleclass and+showparameter support
- Python >= 3.12 (3.9+ supported, 3.12+ recommended)
- Dart Sass CLI - Required for SCSS/SASS theme compilation
- Reveal.js 5.x or 6.x (defaults use 6.0.0; 5.x remains supported)
RevealPack requires the Dart Sass CLI to compile SCSS/SASS theme files. The build process will fail without it.
Install Dart Sass from the official website:
- Visit https://sass-lang.com/install
- Follow the installation instructions for your operating system
- Ensure
sassis available in your system PATH
Alternative installation methods:
# macOS (using Homebrew)
brew install sass/sass/sass
# Windows (using Chocolatey)
choco install sass
# Linux (using npm)
npm install -g sassVerify installation:
sass --versionpip install revealpackNote: Use the appropriate method for your setup, e.g., pip3 or python -m pip...
RevealPack creates a structured project with the following organization:
your-project/
├── config.json # Project configuration
├── assets/ # RevealPack assets and themes
├── source/ # Source files
│ ├── lib/ # Shared libraries and assets
│ ├── decks/ # Individual presentation decks
│ │ ├── lecture-01/ # Each subdirectory = one presentation
│ │ │ ├── slide1.html
│ │ │ ├── slide2.html
│ │ │ └── presentation.json
│ │ └── lecture-02/
│ ├── cached/ # Downloaded packages (Reveal.js, plugins)
│ ├── reveal_template.html # Generated presentation template
│ └── toc_template.html # Generated table of contents template
└── build/ # Built presentations (output)
├── index.html # Table of contents
├── lecture-01/
└── lecture-02/
# Create a new directory and navigate to it
mkdir my-presentations
cd my-presentations
# Initialize RevealPack project
revealpack initThis creates:
config.jsonwith default settingsassets/directory with RevealPack resources
Edit config.json to customize:
- Project information (title, authors, version)
- Directory structure
- Reveal.js version and plugins
- Theme settings
- Presentation configurations
revealpack setupThis:
- Creates necessary directories
- Downloads Reveal.js and specified plugins
- Validates theme configuration
- Generates presentation templates
Add content to source/decks/:
- Each subdirectory becomes a separate presentation
- Use HTML or Markdown for slides
- Optionally add
presentation.jsonfor metadata
revealpack buildThis compiles all presentations with:
- Theme compilation (SCSS → CSS)
- Plugin integration
- Asset copying
- HTML generation
revealpack serveStarts a local server with live reloading for development.
Initialize a new RevealPack project by copying configuration and assets.
Set up the development environment:
- Creates project directories
- Downloads Reveal.js and plugins
- Validates theme configuration
- Generates templates
Build all presentations or specified decks.
Options:
--root PATH: Root directory (default: current directory)--clean: Perform clean build (removes existing build files)--decks LIST: Build specific decks (comma-separated or file path)--log-level LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Serve presentations with live reloading for development.
Options:
--root PATH: Root directory (default: current directory)--no-build: Skip initial build, serve existing files only--clean: Perform clean build before serving--decks LIST: Build and serve specific decks
Package presentations for distribution (creates Electron app).
Options:
--root PATH: Root directory (default: current directory)--target-dir PATH: Output directory for package--no-build: Skip build step--clean: Perform clean build before packaging--decks LIST: Package specific decks
Open RevealPack documentation in your browser.
The config.json file controls all aspects of your project:
{
"info": {
"authors": ["Your Name"],
"short_title": "Lectures",
"project_title": "Science Lectures",
"year": "2024",
"version": "1.0.0"
}
}{
"directories": {
"build": "build",
"package": "dist",
"source": {
"root": "source",
"presentation_root": "decks",
"libraries": "lib"
}
}
}{
"packages": {
"reveal.js": "6.0.0",
"reveal_plugins": {
"built_in": ["notes", "highlight", "math"],
"external": {
"plugin-name": {
"version": "1.0.0",
"url": "https://example.com/plugin.zip",
"alias": "optional-alias",
"main": "main-file"
}
}
}
}
}Note: New projects default to Reveal.js 6.x. Reveal.js 5.x is still supported; set packages.reveal.js accordingly and run revealpack setup to refresh the cached copy.
{
"theme": "path/to/theme.scss",
"highlight_theme": "monokai",
"custom_scripts": ["path/to/script.js"]
}{
"reveal_configurations": {
"center": false,
"controls": true,
"transition": "fade",
"width": 1920,
"height": 1080
}
}RevealPack supports both pre-compiled CSS and SCSS/SASS themes:
- Create
.scssor.sassfiles - Use variables, mixins, and nested rules
- Automatic compilation with Dart Sass
- Hot reloading during development
// Example theme.scss
$primary-color: #007acc;
$background-color: #f8f9fa;
.reveal {
background-color: $background-color;
.slides section {
color: $primary-color;
}
}Create individual HTML files for each slide:
<!-- slide1.html -->
<section>
<h1>Welcome to My Presentation</h1>
<p>This is the first slide</p>
</section>Use Markdown for simpler content:
# Welcome to My Presentation
This is the first slide
---
## Second Slide
- Point 1
- Point 2
- Point 3Add presentation.json to customize individual presentations:
{
"titlepage": {
"headline": [
"Lecture 01",
"Introduction"
],
"background": {
"image": "lib/img/cover.png",
"size": "cover"
},
"by": "Author Name",
"byinfo": [
"Date",
"Course Info"
],
"notes": []
},
"footer": {
"left": "Lecture 01",
"right": "<a href=\"https:\\\\github.com\\Khlick\\revealpack\" target=\"_blank\" rel=\"noopener noreferrer\">©2025</a>"
},
"slides": [
"intro.html",
"group1.html",
"group2.html",
"outro.html"
]
}RevealPack includes enhanced print functionality that extends Reveal.js's built-in print capabilities:
- Normal Print:
?print-pdf- Standard Reveal.js print mode - Show Hidden Elements:
?print-pdf+show- Shows elements with theprint-invisibleclass
Use the print-invisible CSS class to hide elements during normal print mode:
<div class="print-invisible">
<p>This content is hidden in print mode by default</p>
</div>When using ?print-pdf+show, these elements become visible in the printed output.
- Speaker Notes: Hide speaker notes in normal print but show them when needed
- Interactive Elements: Hide interactive elements that don't work in print
- Supplementary Content: Hide additional content that's only relevant during presentation
- Debug Information: Hide development/debug information in final prints
If you encounter errors related to SCSS compilation:
-
Check if Dart Sass is installed:
sass --version
-
If not installed, install Dart Sass:
- Visit https://sass-lang.com/install
- Follow the installation instructions for your operating system
-
If installed but not found, check your PATH:
- Ensure the directory containing the
sassexecutable is in your system PATH - Restart your terminal/command prompt after installation
- Ensure the directory containing the
-
Environment variable override: You can specify a custom path to the Dart Sass executable using the
REVEALPACK_SASS_PATHenvironment variable:export REVEALPACK_SASS_PATH=/path/to/your/sass revealpack build
- "Dart Sass CLI not found": Install Dart Sass from the official website
- "SCSS compilation failed": Check your SCSS syntax and ensure Dart Sass is properly installed
- "Plugin download failed": Check your internet connection and plugin URLs
- "Theme not found": Verify the theme path in
config.json
For more detailed information on development, see the Developer's Guide.
This project is licensed under the MIT License - see the LICENSE file for details.