Hello World from Hugo!

If you’re reading this, you’re probably viewing a version of my blog generated by Hugo (unless you’re reading this on gemini). If you’re not familiar with Hugo, I can assure you he’s not my smarter twin, who decided to rebuild my personal site for me.

Hugo is a static site generator developed in Go. I personally think it’s great because it’s easy, simple and fast.

Hugo has many other features that make it a solid, static site generator. I won’t cover them here as I wanted to elaborate more on the ones that weighed the heaviest in my decision to migrate away from my Jekyll personal blog.

Easy

Borrowing from its Go heritage, Hugo offers a streamlined, “batteries included” developer experience, with a useful range of tools included in the same binary out-of-the-box. You would expect to find many of these functions on any modern static content generator worth their salt, but Hugo adds a couple of nice touches which I like.

My favourite feature is the hugo deploy command. The site deployment functionality built into Hugo does what it says on the tin basically; it allows you to publish your Hugo site to most of the major blob storage providers rather easily: Google Cloud Storage, Azure Storage and crucially for me, Amazon S3.

The hugo deploy built-in won me over as I was not awfully impressed by my pre-existing publishing process. Previously, uploading new content to sgfault.com involved installing a tool in my system-wide Ruby package registry that I then I point at my Jekyll site to upload my content to a public S3 bucket. The tool is half-written in Java so it requires the JRE as well as the whole Ruby shebang to run. Furthermore, the tool is no longer maintained. It still works and I don’t really mind apps slowing down development if they’re deemed feature-complete, especially if they’re open source, but it’s just not that great on the whole.

Simple

Hugo is readily distributed as a package or as a standalone binary you can install yourself. That’s it, no dependencies required.

On the other hand, Jekyll websites are ultimately Ruby applications so you have to install quite a few things to get going with a somewhat functional website:

That’s a fair amount of moving parts just to build a simple static blog, and you haven’t even deployed the site yet! You’ll want to throw in some nice CI/CD pipeline for the smooth, publish-on-push services like Heroku or Netlify have gotten us all used to, right? Handwriting a bunch of HTML files yourself and gluing them together with some chewing gum and Bash scripts doesn’t sound too bad now, does it?

Fast

Hugo built this blog in about 240 ms on my 6 year-old, i7 laptop processor (less than 200ms on a builds.sr.ht Alpine build), whereas it takes Jekyll an average of 440 ms to achieve the same result. In the grand scheme of things, the difference is negligible, but Hugo is almost twice as fast nonetheless!

Lower build times also contribute to an even more immediate feel to the local editing experience than what I’m used to while live reloading is enabled on the Hugo dev server.

Conclusion

This is the third time I switch content generators for my website. It started with RefineryCMS, which provided too many features for my rather simple needs, at the expense of having more things lodged between me and the content I wanted to write. For my first migration, I decided to stick with the Ruby ecosystem and move over to Jekyll, which was a big improvement in many ways. However, leaner solutions have emerged over time, better suited around my needs. Now feels the right time to migrate again.

Overall, I’m really happy with Hugo. I was able to replatform, restyle and deploy this blog in a couple of days and build a CI/CD pipeline around it, which is something my old website lacked. This has reduced friction in my writing workflow and will encourage me to write more often. I may write a blog in the future explaining how I performed this last migration as it was quite a bit of fun to put it all together.

Artwork by Ashley McNamara

Back to top ↑

Do you have any questions, comments or feedback about this article to share with me or the world?

Send an email to my public mailing list. You can also reach out to me privately if you'd prefer. I would love to hear your thoughts either way!

Articles from friends and people I find interesting

Interview with Ron Jeffries

Markus Gärtner interviewed Ron Jeffries, co-author of the Agile Manifesto and Coach of the first Extreme Programming team. Ron reflects back on the past 20-or-so-years of Agile Software Development and dares to look ahead on things to come.

via ronjeffries.com August 18, 2024

Deep list copy: More than meets the eye

I recently came across a take-home C programming test which had more depth and complexity than I suspect the interviewer intended. While considering it, I also came up with a novel, or at least unconventional, solution. The problem is to deep copy a li…

via null program July 31, 2024

Linux is a CNA

As was recently announced, the Linux kernel project has been accepted as a CNA as a CVE Numbering Authority (CNA) for vulnerabilities found in Linux. This is a trend, of more open source projects taking over the haphazard assignments of CVEs against their …

via Linux Kernel Monkey Log February 13, 2024

Generated by openring