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

Forth: Next Try

Our first experiments went well. Let's start an implementation that's more like the kind of code we like to write. [Result: I am delighted!] (Also lambdas!)

via ronjeffries.com December 16, 2024

My Home Office Setup

I have been iterating on my home office setup for a while now. This post describes my current setup as we reach the end of 2024. This photo shows my current setup. Monitor: Samsung Odyssey G9 ¶I have tried several monitor setups—two landscape; one landscape…

via Blog on Dan North & Associates Limited December 10, 2024

Everything I've learned so far about running local LLMs

This article was discussed on Hacker News. Over the past month I’ve been exploring the rapidly evolving world of Large Language Models (LLM). It’s now accessible enough to run a LLM on a Raspberry Pi smarter than the original ChatGPT (November 2022). A…

via null program November 10, 2024

Generated by openring