---
title: "Hugo with continuous integration"
date: 2019-12-20T14:21:15+01:00
draft: false

author: Jan Wedekind

featured_image: /images/hugo.png

tags:
- continuous integration
- hugo
- netlify

categories: 
- Tech

---

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:

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 
* 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.

[static website generator]: https://en.wikipedia.org/wiki/Web_template_system#Static_site_generators
[Hugo]: https://gohugo.io
[Hugo documentation]: https://gohugo.io/hosting-and-deployment/hosting-on-netlify/
[continuous integration]: https://en.wikipedia.org/wiki/Continuous_integration
[Netlify]: https://www.netlify.com/
[Git]: https://en.wikipedia.org/wiki/Git
[Github]: https://github.com
[Working Copy]: https://workingcopyapp.com
[FTP]: https://en.wikipedia.org/wiki/File_Transfer_Protocol
[CDN]: https://en.wikipedia.org/wiki/Content_delivery_network
