Switching to Hugo From Ghost

3 minute read Published:

Switching to Hugo from Ghost - or how I moved from a JavaScript CMS to a Go static site generator

Backstory

I am running this blog since the start of 2017, and while Hugo was something that I was really considering using, I ended up using Ghost, for its beautiful editor and other UI bling blings.

Ghost in the shell

At the time, Ghost was in his early minor-only version, and the set up was more or less manual. This meant that you needed to get an archive, install dependencies (Node.JS, npm, MySQL), set them up, and you’d end up with a working CMS. Updating it, though, was rough. Back up content, download archive again, install/update npm dependencies if needed, put content back, hope it’ll work. It worked, most of the times.

After upgrading to v1, they introduced a Node.JS package which dealt with installing and updating your Ghost instance - a cli wizard, let’s call it. It is written in JavaScript, so it was a bit slow at the time. While the wizard did all the hard work, upgrades to the platform would sometimes fail, and running the instance was based on flipping a virtual coin. Let’s say I was too tired to try to debug random issues every time, so I just didn’t update. Awful, right?

Compiled goodness

Fast forward a half a year, I switched to Hugo. I got tired of all the shiny UI and improved UX, tired of heavy interfaces with sliding panels. I wanted something mature, well developed, but mainly keyboard driven - it was right in front of me all this time.

Hugo lets you create customized themes and content thanks to Go’s awesome templating engine, allows you to use any kind of structure you want for your content, adding static files is as easy as copying a file from a directory to another (hint: it’s the static one), and lets you to focus on your content, rather than UI.

Long story short, I had created my first Hugo site in less than a minute.

Theming

A barebones hugo website is blank - something I did not expect at first. This is due to the fact that you have to get a theme, and specify it in the site’s config. To do this, I went straight to the Hugo themes directory, and chose After Dark, a full fledges and customizable theme. It has a nice and straightforward installer, sets up an initial config, and you’re done. Theme added & website made usable in less than 5 minutes. A little bit of tweaking here and there, and the whole website was done in less than 30 minutes.

Conclusion

I will fiddle with the theme in the near future, but this is all for now.

Goodbye JavaScript & heavy load, hello Go & caching.