How to Skip Jekyll Build Process on GitHub Pages

4/28/2021

GitHub Pages is great for hosting Jekyll sites, however once your site becomes a little more complex you may find you need a plugin that’s not supported by GitHub Pages. In these situations, you can still use the plugin. You just need to “build” / render the site locally and then commit the pre-built / pre-rendered site to GitHub.

Most of the time this works fine, however I recently ran into an issue where GitHub Pages was still trying to build the site despite the fact I had already built it locally. I was using a custom (a.k.a non-supported) plugin so the build was failing. As a result, GitHub Pages wouldn’t serve the updates I had just committed.

The fix for this a little arcane, but fortunately quite simple:

Create and commit a completely empty .nojekyll file in the root of your GitHub Pages site’s repo

That’s it.

Tested On

Sources

  1. https://pages.github.com/versions/
  2. https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/

Like This?

for More in the Future

with Comments / Questions / Suggestions