As I've written about a couple of times already, I think static site generators are pretty great. But that still leaves picking the right static site generator.
As I've mentioned before, this site is built with Hugo, and I'm currently very happy with the setup. However, I didn't start with Hugo. My first experience with a static site generator was actually with Hexo—a static site generator that I wanted to love but found that I just could not.
This post is all about what drew me to Hexo in the first place. And then, part two of this review, I'll get into what ultimately pushed me away from it.
What I loved about Hexo
Hexo has two huge advantages over Hugo (at least in my book). First, it's got a much better templating language. When writing the files that determine the layout or overall style of your site, Hugo forces you to use a custom Hugo-specific syntax built on Go (a.k.a Golang), the language in which Hugo is written. And—though this is perhaps subjective—it's just not the prettiest of languages.
On the other hand, Hexo gives you your choice of templating languages: it supports Swig, EJS, Haml, or Pug (formerly known as Jade). The details of these don't matter too much—what matters is that you get your choice of several well-regarded templating languages instead of being forced into one.
To be fair, this wouldn't matter that much to a lot of people. It's entirely possible to use either Hugo or Hexo without ever writing a single template: both of them have an abundance of themes to choose from. Pretty much regardless of your taste, you can find something that fits your style, and can easily tweak it to meet your needs.
However, for whatever reason (stubbornness? need for control? desire to learn all the things?), I am determined to write my own theme for whatever static site generator I end up using. (Which might explain why my site is currently as minimalist as it is, though I keep making improvements).
As a result, I knew I'd be spending a fair bit of time with the templating language of my chosen tool, and the better options Hexo provided were a clear point in its favor.
Conversely, Hugo is written in Go, a language that I don't know and can't foresee spending any serious time with in the near future.
Now, I don't have any of those problems—the compile time of my programmes is typically measured in milliseconds, not hours, I'm mostly working in small teams or on solo projects, and I've got to plans to hire hoards of recent CS grads from MIT. So, it just doesn't seem to be the right fit.
Now, none of that is to say that Go is a bad language. In fact, it's still one I'd like to learn. It's just lower on my list than… oh, at least a half-dozen others. (Rust, I'm coming for you soon!)
So, Hexo had two strong points in its favor: a better templating language and a better (for me) underlying language. Those two advantages were enough to get me to try it out. In part two of this review, I'll talk about what hidden disadvantages made my stay with Hexo a short one.