This page looks best with JavaScript enabled

Hosting on GitHub pages

 ·  ☕ 2 min 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. Of course I was able to publish it manually but I do like to automate everything :-)

    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 were not showing up and for that I had to tweak the template as this theme is apparently not handling that out of the box.

    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!

    Share on

    Perica Zivkovic
    WRITTEN BY
    Perica Zivkovic
    Earthling