Duplicating HTML is a waste of time. Hence: the static site generator.

Static site generators (SSGs) have existed all the way since HSC (“HTML Sucks Completely”), which was created all the way back in the 1990s. A typical SSG will process text in the form of Markdown and render it onto an HTML template. Because of this, SSGs are really helpful for writing online publications since they allow you to write HTML once instead of duplicating it for each new post. To this extent, there were a few options that I personally looked at when deciding to write a blog: there’s Jekyll, which is written in Ruby; Hugo, which is written in Go; and Zola, which is written in Rust. In order to figure out why I personally picked Zola, let’s go through these 3 options and see how they differ.

Jekyll🔗

Jekyll, created in 2008 and written in Ruby, is an SSG that quite a few people have likely used without even noticing; this is due to the fact that GitHub Pages is powered by Jekyll1. Installing Jekyll is quite a simple task through RubyGems (Ruby’s package manager), but I would like a single binary install just to avoid installing dependencies.

Jekyll uses Liquid to handle HTML templating; this means that Liquid has a simpler syntax when compared to something like Jinja2 but is less flexible due to its smaller feature set. An example of a missing feature is template inheritance, which I find extremely useful as it reduces the amount of code I need to write even more. Another sacrifice made due to the use of Liquid is poor error messages, which is a deal breaker for me since good error messages make the entire development experience much less frustrating.

One thing that Jekyll does have is a very big ecosystem, as the community has had a long time to develop a variety of plugins and themes. Because of this vast ecosystem, making a blog with Jekyll is a bit easier since you’re going to find plugins, themes, and existing code that do exactly what you want. Jekyll also has long-term support for older versions, which means your blog will keep working even after a major update. Therefore, I believe Jekyll is a perfectly competent, easy-to-configure SSG that won’t break with future updates.

TLDR🔗

Pros:

  • Very large community
  • Relatively easy to setup
  • Stable long term support

Cons:

  • Lacks some key features
  • Bad error messages
  • Not a single binary!

Hugo🔗

Hugo, created in 2013 and written in Go, is a more advanced SSG when compared to Jekyll in the sense that it has a lot more features, which may or may not be useful depending on what you’re trying to do. Hugo is pretty popular, seeing as it has 80k stars on GitHub, with even big corporations like Cloudflare using Hugo for developer documentation2. Installing Hugo is extremely easy on all platforms, since there are prebuilt binaries available for all platforms on all common package managers (guides here). Hugo’s template system, on the other hand, is a bit more complicated than something like Jekyll or Zola, but it also provides more flexibility for advanced users since you get more tooling out of the box.

An example of a really cool feature that Hugo has is its asset pipeline, which allows you to process files through the SSG. In the case of images, this means you can tweak images to look perfect on your website without launching a dedicated photo editor. For other types of resources (e.g., code, SVG icons), you can minify the file contents to help your website load just a bit faster.

One drawback of Hugo is the lack of a plugin system, which means extending functionality isn’t possible to the same extent as Jekyll. This doesn’t mean that Hugo has a small community, however, as there are a lot of very high-quality themes for Hugo, which can be found on the official theme page. The final feature that I found very, very convenient is TailwindCSS support in Hugo, since TailwindCSS is such a useful tool for styling your websites seamlessly, without ever writing a line of CSS.

Overall, Hugo is a step up from Jekyll in the sense that it simply has more features, at the cost of some extra complexity. This is extremely obvious when you take a look at the somewhat complex documentation, which was very challenging for me to read. Therefore, Hugo is an SSG for people who have a lot more time to explore every single feature.

TLDR🔗

Pros:

  • Single binary install
  • Feature complete SSG
  • Very useful asset pipeline
  • TailwindCSS support

Cons:

  • Poor documentation
  • Less intuitive template system
  • No plugin support

Zola🔗

Zola, created in 2016 and written in Rust, is somewhere in between Hugo and Jekyll when looking at the SSG spectrum. Zola is a bit more low profile than Jekyll or Hugo, but it’s still not a small project, as it has over 15k stars on GitHub at the time of writing. This means that you can still find some fantastic examples online and some really nice themes on the official website. Installing Zola is about as easy as installing Hugo, as it’s a single binary, and it’s on a lot of package managers (see install page), though I believe it’s on a few less package managers than Hugo. The templating system is where I believe Zola really gets it right, as it has a really similar syntax to Jekyll (Liquid) templates but has way more flexibility due to Zola’s extension of the underlying Tera templating system.

Zola’s documentation is also really well structured and easy to read when compared to Hugo’s documentation, which is arguably the most helpful feature for almost anything on the internet to have. Zola also has very basic image processing in the form of resizing images, which I think is enough for most people since anything beyond that is simply done better in a photo editor.

Like Hugo, Zola doesn’t have a plugin system to extend its existing feature set, which may be disappointing if you have one really important feature that simply isn’t available by default. There are a decent amount of themes available for Zola, but not nearly as many as Hugo or Jekyll. However, this is slightly mitigated by the great Sass support, which automatically compiles Sass files into CSS files. This means making your own theme is slightly less annoying compared to Hugo, which I believe makes you manually specify each Sass file to compile3.

Hence, I find Zola to be a much more effective SSG when compared to Hugo, mainly because the documentation is so good that I can properly understand each and every feature that is available and use them to their maximum potential. Coupled with more features and a single binary install, Zola becomes an SSG with just the right balance of features and complexity in my opinion.

TLDR🔗

Pros:

  • Single binary install
  • Great documentation
  • Liquid-like template system
  • First-class Sass support

Cons:

  • No plugin support
  • Relatively small community
  • Not as feature rich

Conclusion🔗

The reason for which I adore Zola should be obvious by now. It’s so much easier to get into compared to Hugo or Jekyll, mainly because the documentation is a delight to read through and every feature I would ever need is available in the single binary install. This is not to say that Jekyll and Hugo are horrible options. Both Jekyll and Hugo are great options depending on what you’re looking for in an SSG. That being said, Zola is simply the best option out of the 3 options that I took a look at for my use case. Since this isn’t a comprehensive list, I suggest checking out Jamstack’s SSG list to find something that works for your use case.

  1. https://docs.github.com/en/pages

  2. https://blog.cloudflare.com/new-dev-docs/

  3. https://gohugo.io/functions/css/sass/