Anestis' notes

Setting up Hugo for GitHub hosting

I’ve been meaning to setup a technical blog as the place to publish some of the notes I’ve been traditionally gathering in Evernote notebooks. I’m also a huge fan of Inception. So here are the steps you need to take in order to use Hugo to publish a technical blog on GitHub pages.

Why Hugo?

Hugo recently came up on my Twitter feed (which also kickstarted my latest attempt on public technical blogging). I also dislike Ruby and all its derivatives, so Jekyll was out of the question. 😄

Setup on Mac

I use Homebrew on my Mac, so setting up the client-side was all about following the relevant instructions. After that I used the Quickstart guide. I’m giving VS Code another go, so installed a few extensions (Hugo Language And Syntax Support, Better TOML) along with the IntelliJ IDEA Keybindings to assist the muscle memory.

Setup on GitHub

I chose to publish the blog as a user site (see Types of GitHub Pages sites) , so I followed again the Hugo documentation on how to Host on GitHub. Briefly:

  • Created a private blog repository that is tracking Hugo’s content and other source files
  • Created mranest.github.io repository that is added under public folder as a submodule
  • Setup a workflow action, as described in Hugo: Deploy Static Site using GitHub Actions

I also chose to use a custom domain for the blog and followed the corresponding documentation for Managing a custom domain for your GitHub Pages site.

Here are some other links, and some TODO items for future improvements.