Hosting a Ghost blog on Github for free!
What you are looking at is a blog post written on the Ghost blogging application then turned into static html and pushed in to a Github repo.
Sounds like a lot of hassle, why bother? Well, because it will save you money.
In order to edit the blog I run Ghost v0.6.4 locally in node v0.10.9 on my Windows machine. On changing content/ theme or adding/ editing a post I use Buster to transpile the dynamic content from the running Ghost instance in to interim static html pages. I then run some post-processing steps with Gulp to produce the final version of the static html and assets (css, js, images etc.). Finally I push those contents up to my GitHub repo.
I've taken the additional step of having my own custom url so I paid for the registration (USD14) and I pay monthly for the DNS using DNSimple which is USD0.80 on a maxed out (10 domains for USD8 per month) legacy Silver plan. So it's not quite free but 80 cents a month running cost for a blog takes some beating!
If you are going to take this route to host your blog then the following two links are invaluable and Alexander Kahoun is a legend.
- Using GitHub Pages with Ghost and Buster on Windows (part 1)
- Using GitHub Pages with Ghost and Buster on Windows (part 2)
My own modest contribution to the process can be found in the README on my ghost-builder repo which you are welcome to have. Please star it if it helps you.
It's further worth understanding the limitations of Github pages for hosting and why it's necessary to take all these steps. Fundamentally Github Pages will only serve static content. That means only exactly the files hosted on the server. It will not serve content from an app like Ghost. That's why you aren't hosting Ghost on Github but rather the output from the Ghost application running on your local machine. You are using Ghost because it is a beautiful way to blog and it is fully featured running locally. But you could conceivably use another blogging platform and do the same sort of process to get it to emit static content which you then push in to your Github repo to display using Github Pages. Phew! Get it? If not put a comment below and I'll try to help you out.
Have fun!