Hauchiwa
Incredibly flexible static site generator library with incremental rebuilds and cached image optimization. This library can be used as the backbone of your own static site generator, it can handle all the mundane work:
- gathering content files from the file system
- optimizing images and caching the work
- compiling SCSS and CSS stylesheets
- compiling JavaScript applications via ESBuild
- watching for changes and incremental rebuilds
Feature flags
server- add a HTTP server for the generated website's files in watch mode
Get started
To get started add the following snippet to your Cargo.toml file.
[]
= "*" # change this version to the latest
= ["server"]
Declarative configuration
The configuration API is designed to be extremely minimal while providing the maximum of value to the user by being flexible and unopinionated. It's supposed to be really delightful and intuitive to use.
Here's a small sample of how you can use this library to create your own generator. Let's start by defining the shape of front matter for a single post stored as a Markdown file.
/// Represents a simple post, this is the metadata for your Markdown content.
The main.rs of your application can use clap to accept any additional CLI
arguments, such as mode.
use ;
In the main function of your application you can configure how the website should be generated.
The full documentation for this library is always available on docs.rs, please feel free to take a look at it 😊
License
This library is available under GPL 3.0.