Skip to main content
  1. Tags/

Hugo

2023


Git submodules and newly cloned repositories

·1 min

As a reminder for my future self: If one clones a repository to a new location, the submodules are not cloned automatically. They need to be initialized and updated once, in order to show the proper content.

git submodule init
git submodule update

If the theme is a submodule and the customizations are in a different branch, one needs to switch to that particular branch as well. D’oh!

git checkout live

Keep the hugo theme up-to-date

·1 min

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 function 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 Terminal
  • 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:

Streamlined publishing

·2 mins

Maybe I can make writing a habit by simply doing it once a day. But the process of publishing would need to be simpler.

I still struggle with a hybrid world. Hugo is currently only running on my windows workstation and rysnc only works on my WSL.

I could try to debug my hugo installation on WSL, but I am too lazy to do that. I could also use robocopy instead of rsync, but I don’t want to go that way either (working with ssh keys was a bit of a pain).

We are now live

·1 min

Tonight I finally finished tinkering with a hugo theme and uploaded everything to my server.

The current process isn’t pretty but it works 😅 Once I have a new post I need to follow these steps:

  • Empty hugos local public folder
  • Render new html files with the simple hugo command
  • rsync everything to my server with rsync -avz --delete public/ user@server:/path/to/html/

Somehow I broke my hugo installation on the WSL. So now I have to run the hugo rendering command in PowerShell but still use WSL for the rsync command, since that is never going to be available in Windows (rsync support - out of scope).

I still remember using these 💾

·1 min

I still remember using 5¼ and 2½ floppies in my early pc years. Even though nobody calls it pc any more. I also remember blogs but never got around to have my own for long. Let’s see if it works this time.

I finally found the time to spin up a hugo server and play around with it. I have to say, I like it a lot! Goodbye Wordpress 🥳

Since I don’t want to start with an empty page, I am going through my pictures and write down some stories from the past month.