Hosting on GitHub pages

Hosting Hugo generated blog on GitHub pages

Perica Zivkovic

2minute read

For a while now, I was preparing to post more on this blog but managing the content was not so easy as I did not had automated way to publish new posts. Ofcourse, I was able to publish it manually but I do like to automate everyting :-)

As an experiment on how to improve this, I have decided to move this blog to be hosted in GitHub pages. This was quite easy to do by following the default guide from the Hugo documentation, however there were some gotchas that I would like to mention here:

  • Jekyll that is powering GitHub pages turned some static files that I was hosting in the root of the website (keybase.txt etc.) into 404’s. This was easy to resolve by adding empty .nojekyll file into the root of the public folder. This basically turns off Jekyll completely and allows serving all files - they are static anyway…
  • Hugo was adding whole bunch of empty lines while generating html pages which was easy to remove with simple sed commands in the deploy script.
  • Meta keywords are still not showing up and for that I suspect that I need to tweak templates as this theme is apparently not handling that [TODO].

So all in all quite a nice improvement that makes it easier to publish posts. Lets see will this help me to actually blog more often!

comments powered by Disqus