Local Usage

Installation

From crates.io:

cargo install simple-gal

From GitHub releases:

Download a pre-built binary for your platform from the releases page. Place it somewhere on your PATH.

Building your site

The default command reads from content/ and writes to dist/:

simple-gal build

Override the input and output directories with flags:

simple-gal build --source photos --output public

This processes all images and generates the complete static site in the output directory.

CLI commands

CommandWhat it does
simple-gal buildRun the full pipeline: scan, process images, generate HTML
simple-gal scanScan the content directory and print the manifest (no image processing or HTML output)
simple-gal processScan and process images (generate responsive sizes and thumbnails) without generating HTML
simple-gal generateScan, process, and generate HTML (same as build)
simple-gal gen-configPrint a fully-commented config.toml with all stock defaults

The individual stage commands (scan, process) are useful for debugging. In normal use, build is all you need.

Generating a starter config

To see every available configuration option with its default value:

simple-gal gen-config > content/config.toml

Edit the generated file to keep only the settings you want to customize. See Configuration Overview for details on how config merging works.

Previewing locally

The output in dist/ is a static site. Any local HTTP server will work for previewing. A few options:

# Python (built into macOS and most Linux)
python3 -m http.server --directory dist 8000

# Node.js
npx serve dist

# PHP
php -S localhost:8000 -t dist

Then open http://localhost:8000 in your browser.

Note: PWA features (service worker, offline mode) require HTTPS in production, but work over localhost during development.