Hugo, first impressions

Written on August 31, 2018

I’ve been using Jekyll, a static generator written in Ruby, for a while now. Since the beginning of this site, it’s been built on Jekyll and I’ve grown to enjoy building sites with Jekyll.

I’ve currently made the case for using a static site generator (SSG) for the future at work. Since I’ve got experience with Jekyll, it would be the static site generator of choice, but I wanted to take the opportunity to evaluate an alternative SSG, namely Hugo.

One of Jekyll’s biggest contenders in the static site space is Hugo. Hugo is written in Go. It’s newer than Jekyll and has been growing a lot of support from the dev community.

The reasons for Hugo are:

  • It’s supposed to be blazing fast.
  • Hugo is wrapped up as a binary so there is no need to set up Go to get the command line up and running for development. It can be installed with just brew install hugo and I’m ready to go.
  • Forestry supports Hugo. The reason to go static is that we have identified that it is a viable replacement for WordPress for certain clients and their projects. But the reality is there will be some who will need the ability to manage their own content and this is where Forestry will come into play.

Installation

Installation was really simple. As mentioned above since Hugo is set up as a binary, there is no dependencies for getting it up and running. Unlike Jekyll, since it’s distributed as a Ruby gem, it requires you to already have Ruby up and running on your system before you can get Jekyll going.

For me so many years ago when I first started using Jekyll, it was initially a turn off. macOS comes installed with a version of Ruby, but if Jekyll requires you to have a different version than what you have on your machine, than you’d have to set up something like rbenv. Rbenv allows you to manage different versions Ruby on your system. If you’re a Rails developer, you’re probably familiar with having to manage different versions of Ruby based of different project needs. But to a newbie this is a lot of overhead.

With Hugo’s install, I could install brew and then from brew I can install Hugo and be on my way. Which in my opinion is a better experience. Not to mention I don’t have to worry about a Gemfile or even a Gemfile.lock file with Hugo.

Theming

I’m still trying to wrap my head around theming as it isn’t that obvious to me right now. But it is similar to how Jekyll used to do theming in the past. Themes are hosted in git repos. The differentiator for Hugo, is that themes live in a themes folder. Which means you can have multiple themes and easily switch to the one you’d like to use from the config.toml file.

Speed

Blazing fast. So fast that I seriously thought it wasn’t working at first. As a first look into Hugo, I’m currently in the process of migrating my personal site to build with Hugo. At the time of this writing, I’ve got about 300+ posts that make up my site. I’m looking forward to getting them set up in Hugo and see just how fast it can build my site.

Still researching

I’m still evaluating Hugo as a static site generator contender. For reasons for familiarity, I want to use Jekyll, but I do want to properly evaluate Hugo and see if I can use it instead as the ease of installation and speed alone I think would be worth the switch.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share articles like this one in your inbox. Sign up for my newsletter.