Now with added Zola

4 minutes read


Table of Contents
# Static Site Generation and You

I’m a big fan of statically generated sites, and in my opinion, with good reason. While there are some really great sites out there that are incredibly dynamic, they can reduce performance, have to make a bunch of server-side interactions which can present security risks, not all of it can be cached by a CDN…

I like pages that load fast, and this webserver runs out of my home lab (more on that later). To make the most effective use of my hardware and internet connection, a statically generated site is best. What this means is that the entirety of this website is complete html, built and put onto my nginx webserver. When I make a change, the site is regenerated, copied to the webserver, and served up to you.

Moving to Zola

My previous iteration of this site used Node.js & Gatsby. While pretty flexible, and not exposed to the user, node.js is a bit heavier than I’d like and it felt unnecessary. Plus, I wanted something different (see the title of the entire website being hosted).

Zola works a bit differently - written in Rust, a fast & reliable language now seeing frequent use in the Linux kernel, it makes use a single binary with everything built-in. There are no dependencies, it enhances markdown with simple shortcodes and internal links, and its flexible in supporting simple pages mixed in with blog posts/articles.

On top of that, builds are readily available for every OS I have at home, from the daily driver Debian I’m writing this on, the fun PC running Arch, brew and macports for my Mac Mini, or even a containerized version on docker. I can even put it on Windows (if I had anything running Windows aside from my work laptop).

Since I jump around switching between machines constantly, Zola is a fantastic option for me to build with. Lets look at what I needed to do in comparison to what I had set up for Gatsby:

The other bits of my webhosting remain unchanged, and in just 3 commands I had a live preview going. This is a substantial improvement over setting up node, gatsby, and their accompanying dependencies. Since Zola is a small, simple, single binary, I just have Zola installed in multiple locations for live preview and build capabilities, and use a git repo to store my site.

Since Zola also uses markdown, with extremely minor changes I’ve brought in all the same content that I had on Node+Gatsby into Zola.

But… why?

I’ve been working on various projects of late at home. Some of it is in support of a future small farm, some of it to help my kids learn, and some of it just to have some fun. My wife encouraged me to share what I’ve been up to, so I’ve decided to start posting again.

I could have used Medium, substack, or even github pages for this, but I have a distinct preference for self-hosted solutions, and I still get to leverage the fediverse and other platforms to share.

So on with the… show? Writing? Detailed discussions of the fun things that can be done with simple electronics at home? All of the above, I suppose!