Banhus

Nov 2026

Banhus is a static site generator I made. It's one Python file with no dependencies, and this site is built with it.

Why static sites

Static sites appeal to me because they're simple to host. I can keep a site in a private Git repo, trigger a build and deploy when I push, and serve the result as ordinary files. Python fits that workflow well. Most runners already have it, so I don't need to download a separate binary. Speed isn't a big concern for the sites I make. Banhus is fast enough.

Why Banhus

I made Banhus for myself, and I use it professionally. What I like most is that there's no separation between theme and content. It's all just templates. I can write a page the way I want it to look and reuse pieces in the same straightforward way.

Banhus is meant to be vendored. It started as a build.py I found myself writing for every static site I made, originally using Jinja. It's a small amount of code, so it's easy to adapt to different needs. Over time I replaced Jinja with a template language of its own, and the Markdown package with a basic built-in renderer, so now the whole thing is one file you copy into a project.

Templates

Banhus has its own templating language. It is a simpler subset of Jinja with a few additions that suit the way I work. I like keeping heavier logic in Python. I prepare data and make decisions there, then let templates arrange it. That boundary feels simple and comfortable to me.

There are no expressions or filters, and a typo in a template fails the build instead of quietly rendering nothing.

How it works

Templates in src/ are rendered to the same path in dist/. Everything else is copied as is. Files starting with an underscore are layouts and partials, so they never get written out. Running python3 banhus.py dev starts a local server that rebuilds every time you save.

Try it out at banhus.net.