I built this website as a platform for giving updates on my projects and sharing my thoughts. As someone who builds software and interacts with GitLab on a daily basis, the natural choice for hosting a website was GitLab Pages. It’s completely free and you don’t even have to create another account. The only limitation is that it can only host static sites, but that’s not really an issue for simple text-heavy websites such as blogs.
So why did I choose Hugo? #
Hugo ships as a single executable #
Jekyll is shipped as a Ruby package, which means you first need to install Ruby on your machine. I remember how much of a pain it was to set up a Python environment for the first time1, so the idea of having to install Ruby just seemed like an unnecessary headache.
Hugo on the other hand ships as a single executable so you can do brew install hugo
. It’s just so much easier, and was one of the biggest reasons why Hugo initially appealed to me.
Hugo’s own documentation is excellent #
Since Jekyll is over 10 years old, and you can find loads of examples online to help resolve issues if you get stuck. With Hugo, when I do search for issues that arise, I often get results for Jekyll mixed in, so this is certainly one area where Hugo is weaker.
Fortunately, Hugo’s website itself is very good. The API documentation is quite extensive, and the forums are active. I will concede though that the documentation is quite technical and assumes a lot of prior knowledge, so there are a lot of concepts to get your head around initially (although I don’t know if this is any worse than Jekyll).
While I think it is slightly harder to find help at the moment in Hugo, I think this issue is generally overstated. Given the popularity of Hugo, this is something which should continue to improve over time.
Hugo shortcodes are deceptively powerful #
I read in multiple places that the leaning curve for custom templates is harder with Hugo than Jekyll. For simple templating, Jekyll’s includes are arguably simpler and easier to read using Liquid tags.
Hugo’s shortcodes are more verbose than Jekyll includes, but they support more complex logic. I’m sure you can achieve even more with a Jekyll plug-in if you are proficient in Ruby, but I was able to create a few custom components with shortcodes pretty quickly without any prior experience with Go.
To me it seems that shortcodes strike a sensible middle ground which is powerful enough for most users.
Hugo is faster #
This is unlikely to really matter for most people, but since Hugo is written in Go which is a compiled language, it builds very quickly and faster than Jekyll. It’s nice to know you are very unlikely to run into issues in the future.
-
See obligatory reference to this XKCD comic ↩︎