A static site generator with live preview capability
Engrave is a static site generator with live preview capability. It provides a CLI interface for building static HTML sites from templates and serving them with a development server that features live previews.
The CLI offers three main commands:
build
- Build static HTML files from templatesserve
- Start a development server with live previewversion
- Display the version of EngraveBuild static HTML files from templates.
Source directory containing templates. This directory must exist and be a directory, not a file.
Destination directory for built HTML files. The directory will be created if it doesn't exist.
Asset regex pattern to copy. Default: None
Glob patterns to exclude. This option can be used multiple times to specify multiple patterns.
Default: ["**/*.layout.html"] is always included in the exclusion list.
Maximum number of worker threads. Default: None (system decides)
Set Log Level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default: INFO
Start a development server with live preview.
Directory containing templates. This directory must exist and be a directory, not a file.
Host to bind the server to. Default: 127.0.0.1
Port to bind the server to. Default: 8000
Set Log Level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default: INFO
Display the version of Engrave.
This command has no arguments or options.
engrave build ./templates ./output
Build static HTML files from templates in ./templates directory into ./output directory.
engrave build ./templates ./output --asset ".*\\.(css|js|png|jpg|svg)$" --exclude "**/_drafts/*.html" -w 4
Build static HTML files with specified asset regex pattern, excluding drafts, using 4 worker threads.
engrave serve ./templates
Start a development server for the ./templates directory with the default host and port.
engrave serve ./templates --host 0.0.0.0 --port 3000 --log DEBUG
Start a development server that binds to all interfaces on port 3000 with DEBUG level logging.
engrave version
Display the current version of Engrave.