I don’t know about you, but I love writing code that automates my work. I finally had the chance to do just that, and now I’m the proud owner of a shell script that builds and deploys my Hugo site without any extra help from me - and it even works with my git submodule setup!
In today’s post, I want to take a look at how we can keep our Hugo themes up-to-date. The key to this process is using git submodules to track and pull updates to a theme with just a few quick commands. We’ll see how to connect our theme to its remote source repo, which git commands we need to update it, and even how to safely make our own custom changes to the theme while keeping it in line with the source.
This blog was made with Hugo, hosted on Github Pages, and harnesses the power of git submodules to separate source code from live site data. This tutorial shows you how I got all these systems to work together nicely and how you can use these tools to take more control of your site.