| Crates.io | balzac |
| lib.rs | balzac |
| version | 0.1.8 |
| created_at | 2026-01-03 19:02:28.042296+00 |
| updated_at | 2026-01-25 16:17:34.407616+00 |
| description | A blazingly fast static site generator |
| homepage | https://balzac.rs |
| repository | https://github.com/getbalzac/balzac |
| max_upload_size | |
| id | 2020655 |
| size | 132,677 |
an experiment in building a static site generator using rust
Install balzac
Create a balzac.toml configuration file
Balzac supports different directories that you are free to create or skip:
pages_directory (required): directory that stores all the handlebars templates that will be used to create pages
partials_directory (optional): houses all handlebars partials
layouts_directory (optional): houses all handlebars layouts
Balzac supports hooks that allow you to run shell commands at various phases of the build process. All hooks are optional and configured in the [hooks] section of your balzac.toml file.
Hooks are executed in the following order during a build:
Example balzac.toml configuration:
[hooks]
render_init_before = "echo 'Preparing renderer'"
render_init_after = "echo 'Renderer ready'"
build_before = "pnpm build"
render_before = "echo 'Starting page generation'"
render_after = "echo 'Pages generated'"
build_after = "rsync -av dist/ production/"
To use a collection, create a subfolder in the content_directory folder with the name of your collection (i.e. posts) and put your markdown files in there.
The next step is to create a file in the pages_directory called <name_of_your_collection>/details.hbs (i.e. posts/details.hbs).
All frontmatter present in the collection documents will be available in the template under the fm namespace.
---
title: "Test"
---
will be available under fm.title
All required tooling can be installed using mise with mise install