I’ve been self hosting this site on my own personal web server for quite a few years now. It’s not convenient, but it is cheap, which is always a good motivation for me. Today I’d like to talk about moving this site from self hosting to Github Pages.
There are two really good things about self hosting:
There are downsides too:
My site has been hosted at home for perhaps 8 years now. A few years back I found out about the Hugo project and switched my site over to a static website using Hugo to generate the pages. I haven’t looked back since. I write everything as simple markdown pages, and let Hugo churn through it and spit out my website.
It’s been hosted on an ODROID-HC2 from an SDCARD until tonight. That’s a machine about as powerful as a mid-range mobile phone. Even so, it could serve the pages up quickly, because I used NGinx as the server, and the machine never had to do anything more complex than load a file from disk / cache and spew it to the web.
With all my ducks in a row; I finally decided to switch to using Guthub Pages. They have supported static website generators for a while, but I wanted to use Hugo instead of Jekyll, so it has only really become attractive recently.
In theory, I take my Hugo site, add a little bit of configuration, then push it to a repository, and it is published as a static site. In practice, it took quite a few hours to get all the little bits configured exactly the way Github wanted them. Some info in tutorials wasn’t particularly clear. Windows and Git decided to have a conniption, setting me back hours, but thankfully Linux was the sturdy trooper it’s known for being. LFS also threw it’s toys out the pram. It wasn’t until I disabled LFS, and went with nearly default settings and branch naming that I had success.
In theory, with all the hard work behind me, I simply write this markdown file, commit it to my repo, and push it to Github. The CI will do all the rest. Wish me luck!
Discover more posts like this: