Skip to main content

A static site generator with live preview capability

Project description

Engrave

A lightweight static-site generator using Python + Jinja2 Version: 3.1.4

๐Ÿš€ What is Engrave

Engrave is a static-site generator that transforms plain HTML or Markdown files into ready-to-deploy static websites using Jinja2 templating. Itโ€™s ideal for documentation sites, project landing pages, blogs, or any static content without server-side rendering.

โœ… Why use Engrave / Use-cases

  • Quickly build documentation sites, landing pages, or simple blogs without needing a database or backend
  • Write content in HTML or Markdown and reuse templates/layouts easily
  • Lightweight and easy to deploy (works well with GitHub Pages, Netlify, S3/static-hosting)
  • Highly flexible via Jinja2 templates โ€” layout, partials, includes

๐ŸŒŸ Features

  • Supports HTML and Markdown as input
  • Uses Jinja2 templates for layout and partials
  • Simple CLI command for build and watch/rebuild workflow
  • Clean project structure and Python packaging-ready

๐Ÿงฐ Installation

pip install engrave

๐Ÿš€ Quick Start / Usage

๐Ÿ“˜ CLI Usage

Build

Generate a static site from a source directory into the output directory.

engrave build <content_dir> <output_dir>

Development Mode (Autoโ€‘Rebuild + SSE)

Rebuilds automatically when files change. Can optionally run a preview server.

engrave server <content_dir> <output_dir> [--watch]

# Example: watch only Markdown + HTML files
engrave server docs/ build/ --watch ".*\.(md|html)$"

CLI Help

engrave -h
engrave server -h

Usage: engrave server [ARGS] [OPTIONS]

Start a development server with live preview.

โ•ญโ”€ Parameters โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  DIR-SRC --dir-src                  Source directory [required]                                                          โ”‚
โ”‚ *  DIR-DEST --dir-dest                Destination directory for build output [required]                                    โ”‚
โ”‚    COPY --copy --empty-copy           RegEx patterns based on dir_src for files/directories to copy verbatim [default: []] โ”‚
โ”‚    WATCH --watch --empty-watch        Additional paths to watch, expressed as regular expression patterns relative to the  โ”‚
โ”‚                                       current working directory. These are in addition to files under dir_src and any      โ”‚
โ”‚                                       paths matched by copy. Changes to matched paths will be streamed to web clients via  โ”‚
โ”‚                                       Server-Sent Events (SSE) to enable live preview/reload. [default: []]                โ”‚
โ”‚    EXCLUDE --exclude --empty-exclude  RegEx patterns to exclude from processing and watching [default: []]                 โ”‚
โ”‚    LOG --log                          [default: INFO]                                                                      โ”‚
โ”‚    HOST --host                        Host interface to bind the development server [default: 127.0.0.1]                   โ”‚
โ”‚    PORT --port                        Port number for the development server [default: 8000]                               โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ› ๏ธ Testing

To run all tests, use:

python -m unittest

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

engrave-3.1.5.tar.gz (65.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engrave-3.1.5-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file engrave-3.1.5.tar.gz.

File metadata

  • Download URL: engrave-3.1.5.tar.gz
  • Upload date:
  • Size: 65.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for engrave-3.1.5.tar.gz
Algorithm Hash digest
SHA256 62a3d54b48d1ac115608e1f0ef7d60bd1a6de50d0c56c2c9e501b867fa54c450
MD5 ef019633f71feeb6acfbdfceeffec727
BLAKE2b-256 f318ad40918d8b793e123c1f31c373729b8a7862a35ece5122a4e6de007874bb

See more details on using hashes here.

File details

Details for the file engrave-3.1.5-py3-none-any.whl.

File metadata

  • Download URL: engrave-3.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for engrave-3.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f70bac707eae5f6b1dfeab94f5cafcfab2ff5dfc6737895b995426c9586de9d1
MD5 6b60e0b779bd2a2d7acc39b0959c0b00
BLAKE2b-256 68311a55acddba85a4a35824d497cd50f905bb3bea42401be8e1de466dab05d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page