Blogging with Hugo and GitHub Pages: Discussion

In this section, we’ll discuss the use of the terminal and the differences between Hugo and Jekyll for creating blog sites.

🤷🏻‍♀️ Do I have to use a terminal?

No! GitHub offers a limited selection of built-in Jekyll templates that can be accessed through a GitHub repository’s settings. See the guide here.

However, that is using Jekyll (another tool for generating blog html sites) and we will be using Hugo in this lesson. Hugo has not yet been integrated with GitHub Pages like Jekyll has, so we will have to use the terminal throughout this lesson.

❓ Ok… So why Hugo and not Jekyll?

Here is why the lesson’s author, Sarah Gibson, prefers to use Hugo over Jekyll:

It’s my personal preference, but I think I arrived at this preference via a few technologically sound principals. I’ll demonstrate using the evolution of my own website as an example.

Jekyll requires a lot of extra “stuff” (such as style templates for html rendering) to be committed directly to the repository which just made it harder for me to work out where I was supposed to put things. Hugo uses git submodules to make the same stuff available to your website without actually including it. (But Sarah, aren’t submodules awful? Well… yes. But I personally find the trade off worth it.)

repo_layout_with_jekyll repo_layout_with_hugo
Repo layout with Jekyll Repo layout with Hugo

I’m just gonna let the screenshots speak for themselves on this one… But basically, building with Hugo is pretty much instantaneous, whereas Jekyll can take minutes to build.

build_time_with_jekyll build_time_with_hugo
Build time with Jekyll Build time with Hugo

Hugo is built on Go, whereas Jekyll requires Ruby, RubyGems (and bundler to install them), GCC (a type of compiler) and Make - all of which adds up to be a difficult environment to setup and maintain.

broken_jekyll_build
A broken Travis CI build due caused by an outdated bundler installation

This isn’t to say that Jekyll doesn’t have any positives! For example, it has a much richer plug-in ecosystem than Hugo does. Although, I’ve not needed to use plug-ins just to publish blog posts when I was using Jekyll, and so far Hugo has covered all of my blogging needs.

You can read more about the differences between Hugo and Jekyll here.