Moving the Blog Around

I have played around the idea of having a blog to post simple stuff I’m learning about and have given it a shot a couple of times during the past year. I’ve started out playing with Jekyll and GitHub Pages but I ended up leaving it aside and got back to it when I had to renew my domain.

I did a bit of a trial with Hugo and GitHub Pages but there’s no native way to host it as with Jekyll, so that had to work out with two repos, one to generate the page files and the *.github.io repo as a submole on the first repo which the generated page files were sent to. Yes, it was as clunky as it sounds.

So on the mindset of changes I decided to try Netlify after hearing only great things of it.

Tell you about a seamless switch! In 5 minutes I had the website running out of Netlify. I just:

  1. Removed the *.github.io submodule from the Hugo repo where I build the site;

  2. Changed the publishDir value in my config.toml to public as it’s the default (it was previously my submodule’s directory);

  3. Added a new site on Netlify out of my Hugo repo, it is an easy step to step to add a repo to build your site;

  4. Added my custom domain to the site on Netlify and updated the nameservers on my DNS’ provider to use Netlify’s nameservers.

And that was it! Now any new push to my Hugo repo deploys the blog in a seamless fashion. 💥

I was quite pleased with the simplicity of the process. Netlify has a nice comparison page between its services and GitHub Pages if you want to compare further.