Github Pages refused to refresh my Jekyll blog
Recently I was trying to publish a post (namely thought experiment #8 ) and I was in a hurry. Peculiarly, Github Pages (the hosting I use) didn’t completely refresh the site after my commit with the post. Let’s see how I fixed this.
Fix
Not to waste your time - here is what fixed the issue for me. I just recompiled the blog locally (this just changes the timestamp in a couple of places) and committed again. This time everything worked. I don’t know why. I cross my fingers for it to work for you as well :)
Context
I use Jekyll on Github pages. Since I want to have more control over the visual theme and plugins, I do the Jekyll compilation locally and publish the final html to Github pages. Usually it takes up to couple minutes for Github pages to start showing the new content after my commit.
Symptom
However, that time the link just didn’t work. I kept getting 404. Obviously, I assumed that I made a typo in the link. I double checked - it was fine. I started the Jekyll server locally and it also worked. I manually crafted Github Pages URL from a local URL and still got 404.
I then tried the same link with “.html” in the end and it worked. I might have given up, but this was a thought experiment and Savings Ninja had already published my link without “.html”, so this was not an option.
Discovering the fix
I just decided to follow the usual “turn it off and on again” advice and did another commit with no user visible changes (just some timestamps after Jekyll recompilation).
Happy blogging with timely refreshes of your Github Pages websites!