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.
Requirements
- Ghost 0.10.0
- This buster fork
- Python 2.7
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
Steps
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 buster.py file: https://gist.github.com/alexweber/fdc86aa225e7294c17dfb375e846b599
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 buster.py generate
and python buster.py deploy
and it now just works!
Credits
- https://stefanscherer.github.io/setup-ghost-for-github-pages/
- https://www.sitepoint.com/create-static-ghost-blog-buster/
- http://blog.sunnyg.io/2015/09/24/ghost-with-github/
- http://briank.im/i-see-ghosts/
- http://leftofnull.com/2014/02/24/using-github-pages-with-ghost-and-buster-on-windows-part-2/
- https://gist.github.com/Zuckonit/9044051