I found out that my current setup doesn’t allow for easy theme updates by the author, since I just cloned the theme folder into my hugo project ⊙﹏⊙.

But thanks to Adam and his introduction to gits submodule function1 I was able to work around this.

Create repositories

  • First I created a repository for my hugo project
  • Then I created a fork of my current theme Terminal2
  • The theme was then embedded as submodule in my hugo project and received a second git repository as upstream source (this is the magic function right here)
git submodule add -f https://github.com/<user>/hugo-theme-terminal.git themes/terminal
git remote add upstream https://github.com/panr/hugo-theme-terminal.git
  • I also followed Adams advise and moved my theme customizations to a different branch

Get updates from the theme author

My workflow for theme updates now looks like this:

  • Changes to my customized theme will be added on the live branch
  • Official updates to the theme will be synced to the master branch and merged to live on demand
# from ./theme/terminal
git checkout master
git pull upstream master
git push origin master

git checkout live
git merge master

I’m still not using Github pages for publishing, I kind of can’t let go of my trustworthy VPS.