#static #site #generator

bin+lib favia

Zero-config, content-oriented static site generator with tailwind built-in

3 releases

0.1.4 Mar 28, 2023
0.1.3 Mar 25, 2023
0.1.2 Mar 25, 2023
0.1.1 Feb 3, 2023
0.1.0 Feb 3, 2023

#1532 in Web programming

MIT license

566 lines

favia 🪸

Still very much a work in progress

Sometimes I have some content, and I want to stick it into a website. I'd prefer not to wade into some JavaScript framework simply to glue content and html together. I would especially prefer not to write css directly. So I made favia.

favia is a lightweight static site generator written in Rust. It is zero-config, and has Tailwind built-in, with no nodejs dependency, thanks to the awesome Railwind project. Simply describe your Tera templates with Tailwind utility classes, as well as your content in markdown, and favia stiches them together.


First, ensure you have the Rust toolchain installed, which can be done using rustup. See here for more details.

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, install favia using cargo

$ cargo install favia

Finally, create a new project with the favia new command. The below command creates a project called my_favia_project

$ favia new my_favia_project

Then, you can run a development server, and start hacking.

$ cd my_favia_project && favia develop


There are three commands:

favia build builds a bundle of html, css and static files to be served. The build output is stored in the .favia directory.

favia develop runs a development server listening for changes and rebuilding.

favia new PROJECT_NAME creates a new project with the specified name and all the required folders and files to get started.

You can specify whether you want the output to be verbose, which changes the log level. favia -v build includes debug logs, whilst favia -vv build includes trace logs. It defaults to info level logs.

project structure

A favia project has three directories

├── content
├── templates
└── static

content contains a tree of subdirectories and/or markdown files, optionally with TOML frontmatter, surrounded by +++.

templates contains a tree of subdirectories and/or Tera templates.

static contains all static files, including css files, images and fonts.

favia determines the site structure from these two folders.


See open issues


Please feel free to open an issue if you have found a bug, or, if you want to participate in development, make a ticket describing the issue you're addressing, and reference that ticket in a pull request.


~1M SLoC