How to create a static blog on GitHub pages with Ghost

Even though there's already a handful of really helpful articles out there for getting Ghost + Buster working with Github Pages they were mostly somewhat dated and I had to bang my gremlin face against the wall some to get things working so I figured I'd save some of you from doing the same.


I'm on a Mac and I had to add this to my dotfiles to get Python running properly: export PYTHONPATH=$PYTHONPATH:/Library/Python/2.7/site-packages


You basically want to follow the great instructions in the linked blog posts below and stop at the point where you generate it with Buster.

Although it seems like it works, query strings in the URLs and some html entities get mangled so I ended up having to hack the forked Buster. I'd fork the fork but it's a one-off so no point.

Here's my hacked file:

It's got a new sanitation function (taken from this gist), some extra helper stuff, some hard-coded swill and finally ties it all together to generate not only the posts but also Ghost's static pages and the rss feed, conveniently renamed and moved for Github pages.

The end-result is that I can run python generate and python deploy and it now just works!


Alex Weber

Master gremlin.