Hugo with continuous integration
I am using a static website generator called Hugo now. So far, I am liking it. It’s fast and since the generated site is static, it also loads very fast in the browser. On the flip side though, it’s not as convenient per se to make updates to the site.
At first, I just used FTP. So the workflow basically was:
- Update site locally
- Build site locally
- Transfer / synchronize newly built site via FTP to my hosting provider
It works but it has several disadvantages:
- Synchronizing folders via FTP is slow
- Inconvenient to update without my Mac and FTP client
- Almost impossible to update on the phone
The Hugo documentation pointed me towards a solution that uses 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 use Working Copy, a Git client that is frequently recommended. But it’d even be possible to do quick typo changes directly on Github.com via the browser if need be.
Fun!
UPDATE 2020/01/04:
I’ve been using this system for a few weeks now and it works very well, it almost feels like cheating. Working Copy works 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.