This is a story all about how, my blog got hosted online now - I’d like to take a second just listen up, I’ll tell ya how I became the host of a blog on github.
(please ignore my terrible parody of the Fresh Prince theme song)
Why?
So, I have been a software developer for some years now, and several times set up websites that never really went too far, I tend to focus more on working on projects than keeping a site up to date. However, as I was going through the Fast.AI Practical Deep Learning for Coders course online, I decided to make a blog to keep track of progress on this.
Well, after getting the blog set up initially, I inevitably got distracted on other projects and never really wrote any articles for it. After about a year of not adding anything, I finally decided to get my ass together, reboot this project, and get my blog up and running. I’ve been working on some very interesting projects lately (see my Snake Tank Humidifier post), and wanted to have a place to show them off and finally get a proper portfolio set up.
How?
Getting started with fast_template
So here we are, setting up a blog - I originally followed a tutorial from the Fast AI course to set up the fast_template, a blog powered by Jekyll, and Github Pages, and with the added benefit of being able to compile Jupyter Notebooks into a blog post as well.
I really enjoyed how simple it was to get started, as my main focus at the time was on Machine Learning, not spending a ton of time setting up a blog. Though simple to start with, it turns out that Jekyll is an extremely powerful tool, with tons of themes and basically unlimited customizability across the site.
A note on Jekyll with Ruby 3
Though the template form FastAI displayed properly when served by github pages, I had some issues to resolve in order to get the local preview running. Jekyll does not work with Ruby 3
Adding the Chirpy theme
After getting Jekyll to successfully build on my Macbook, I was looking for a way to spice up the default look and feel of the site. Reading through the Jekyll documentation on themes I came across the chirpy theme, and decided that was the one for me.
I followed the instructions in the theme’s README to install it and it’s dependencies. Unfortunately, since I was converting an existing project, not starting a new site from their template, I had to clone the theme repo and manually copy over all the necessary files to make it run:
- everything in the
_data
,_includes
,_layouts
,_plugins
,_posts
,_sass
,_tabs
, andassets
folders 404.html
app.js
feed.xml
index.html
sw.js
- any missing defaults from the
_config.yml
file (noted here on their readme) - the github workflow deployment hooks:
.github/workflows/pages-deploy.yaml.hook
After all this, there was only one more step to make sure that the Github Pages server was able to properly build the site. Alas there was still an issue - github recognized the new theme, but was still having an “Unknown tag” build error. Since github only supports some plugins by default, we have to add the jekyll-seo-tag
gem explicitly. This required adding another line to the plugins
section in _config.yml
:
1
2
3
plugins:
...
- jekyll-seo-tag
After that, the build worked like a dream, and after a minute or two the Github Pages site was serving up a beautiful brand spankin’ new website: slimnate.github.io
Hope you enjoyed this post and/or found it useful, be sure to check out some of my other posts below: