Hugo with continuous integration


As I wrote earlier, I am using a static website generator called Hugo now. So far, I am really liking it. It’s super fast and since the generated site is, well, static it also loads super snappy fast in the browser. On the flip side though, it’s not as convenient per se to make updates to the site.

For starters, I just used FTP. So the workflow basically was:

  1. Update site locally
  2. Build site locally
  3. Transfer / synchronize newly built site via FTP to my hosting provider

It works but it has several disadvantages:

  • Synchronizing folders via FTP is slow. Really slow.
  • It’s basically impossible to do any updates to the site (even typos) without my Mac and FTP client
  • In particular, it’s impossible to do any updates on the phone

Luckily, the Hugo documentation already pointed me towards a nice solution that makes use of continuous integration: Netlify. I was already using Git and Github for the versioning of my site, so it was a breeze to set up, despite some minor difficulties with the theme.

With this in place, the workflow is much more flexible:

  • Make any change to the site itself
  • Commit changes to Git & push changes to Github
  • Netlify will automatically note the changes and build & deploy the site (on its own CDN)

Et voilà, c’est ça! Now it’s much easier to make quick changes anywhere. All I need is access to Github. On my iPhone, I will try out Working Copy, a Git client that is frequently recommended. But it’d even be possible to do quick typo changes directly on via the browser if need be.

This looks like fun.

UPDATE 2020/01/04:

I’ve been using this system now for a few weeks and I have to say it works really very well, it almost feels like cheating. Working Copy works ok on the phone, too, as well as can be expected on a phone. I still have not come across a text editor that would work really great on the iPhone. But it’s perfectly fine to edit quick typos or make small updates. Then it’s just a simple git commit of the update and the site rebuilds automagically. Nice and simple.

Latest Posts