Hi everyone,
I’m exyone, and I’ve been working on a project called Zest (Zenith Efficient Static Toolkit). It’s a static site generator written in F#.
The core idea is simple: your layout isn’t a template with some logic embedded in it—it’s a real F# script. Instead of fighting with Liquid or Nunjucks, you just write F# code.
Right now, the key features are:
- .zest.fsx layouts: These are evaluated via FSI. They must expose a render function with the signature
SiteMeta -> PageMeta -> string -> string. - .zss files: A custom syntax sugar layer for CSS that compiles down to standard CSS.
- TOML everywhere: Configuration and front matter use TOML instead of YAML or JSON.
- No JS bundler: Native .js files are just passed through as-is.
For example, a post layout looks like this:
#load "base.zest.fsx"
let render (site: SiteMeta) (page: PageMeta) (body: string) =
Base.render site page (sprintf "<article><h1>%s</h1>%s</article>" page.Title body)
The big advantage of using F# for templates is that you can memoize results, handle fine-grained dependencies, and compose everything like normal functions. It’s much more expressive than traditional templating engines.
I’ve taken a lot of inspiration from 11ty’s flexibility, but I’m aiming for the speed of Hugo combined with the power of F#.
It’s still early days (the FSI evaluator and .zss compiler are works in progress), but I’d love to hear your thoughts, especially on the .zest.fsx API design.
You can find the repo here:
Thanks for reading!