Migrating to Zola SSG

by FPSD — 2023-07-25


Overview

Recently I switched from Haunt to Zola as the static site generator for this blog. Main reason was a bit of frustration with Haunt's documentation and the CommonMark implementation it was using which was holding me back.

Why the switch

When starting this blog I wanted something simple and potentially hackable, in terms of being able to play with the generator like any other Lisp program, modifying it a runtime and seeing the result of the change right after it happened.

While Haunt is totally capable of doing so the first roadblock (at least for me) is that it is written in Guile which I don't know at all; given that it is a Lisp I hoped to get into it quickly, but I've never studied it or played with it too much, and there is only so much time in a day so I cannot play with all the fun things that there are around and at the same time hope to get some work done!

So I started looking for alternatives, maybe leaving aside the hackability of the underlying system in favor of focusing on writing content.

Don't get me wrong, Haunt is very nice and customizable, it is not just a toy and for example it is used to build the Guix website (and others); it is possible to look at that site sources to get an idea on how to write a great website! The problem is that I did'n manage to learn few fundamental things, Guile and Haunt internals, quickly enough to be confident with this system and be productive with it. Better luck next time, maybe.

Candidates

Cryogen

Language: Clojure Documentation: While complete the feeling is that it does not flow too well

Pros:

Cons:

Nikola/Pelican

Language: Python Documentation: Complete

Pros:

Cons:

Hugo

Language: Go Documentation: Complete

Pros:

Cons:

Zola

Language: Rust Documentation: Complete

Pros:

Cons:

Final decision

Admittedly I did not run a very scientific comparison process, what I did was to try to run a generator with its defaults, hack it a bit and measure:

What I did not care about:

Following the principle of "least resistance path" I went with Zola because the process to get to that first post was really painless! Some engines were not properly documented, with other I felt overwhelmed by options or in the end it did not feel just right.

It took me 10 minutes to get Zola's approach and file structure, another 30 minutes of grunt work to port the front matter of posts from Haunt (I could have automated it but it was too hot that day and I was not able to think too much, but it would have been a nice exercise with Babashka!).

While others may be more complete solution to build complex websites, what I really want is a tiny container for my posts, potentially some other pages like contact section, bio etc. and Zola was able to deliver in just no time.

Your requirements may be totally different and other engines may work better for you, all I can suggest is to try (some of) them and see which one sticks to you!