It has never been easier to have a blog with Github Pages
It’s been 7 years since I migrated the blog from Blogger to Github Pages + Jekyll. Back at that time, I was totally new to Git. I used a Windows machine to build the blog and I remember it was a nightmare to install Ruby and make it work properly. Also, I forked the theme I used and I never updated it. Anyway, I managed to maintain the blog active. Enough old stories, now it’s extremely easy to have a blog like this one.
Github pages in Github
You can have a site up and running in 5 steps. It has to be public and by default the domain is
yourusername.github.io. You can configure your own custom domain. Having a Jekyll blog has more steps but it’s also pretty easy. Summary:
- Easy setup
- Public repo
- Short amount of themes
- Ability to set you own custom domain
Github not accessible
A Spanish internet provider, Movistar, had a bug that make Github unreachable. This is the main provider in Spain so suddenly the blog was down for a lot of people. I decided to deploy the blog somewhere else, that means, use Github as repo but deploy the jekyll build process output to another provider. I went for Vercel, the same place I deploy the Net Salary Calculator.
Here is when I discovered how outdated and how custom was my good old jekyll blog. I took the chance to rebuild the blog from scratch. At the end it was just creating a new jekyll blog and then moving there my posts and pages.
Github pages + Vercel + Minimal Mistakes theme
Vercel has a template for Jekyll that works out of the box so you just have to pick your repo from the menu and leave the other options as default. It will be deployed in a minute. Good thing about using Vercel? I have a more generic Jekyll version so I can use my favourite Jekyll theme, minimal mistakes. It comes now as a gem so I won’t have problems updating. I made some custom changes to the layouts provided so my posts can be multilanguage and I can override the layouts to keep this functionality. I just had to create the
_layouts folder and inside set the files I want to override.
Main advantages, same as Github plus:
- Repo can be made private
- You can set any Jekyll theme you want
Have a look at the source code, you could replace the
_posts files with your own ones, configure the
_config.yml with your data and have your own blog in minutes.
Leave a comment