GitHub Pages & Ghost - Just blog it!
A year and a half ago, I migrated my blog from WordPress to GitHub. I was very happy to have a responsive and nicely styled blog thanks to Octopress which I could host for free on GitHub Pages. I even created a small goodbye post explaining how I did that. Today, I am still happy with GitHub but ... I'm leaving Octopress.
I enjoyed working with Octopress. Thanks to it, I was able to express my posts in the much easier Markdown syntax (as compared to the WordPress's HTML syntax I was using at the time). Yet I needed a Markdown editor for the purpose - ReText. It was slightly inconvenient to use one more tool (apart Octopress) but not a big problem. Unfortunately, the workflow of creating a post became slower when I wanted to get the new functionality of Octopress working. Thus I've decided to search for a lighter and easier tool to work with... this is how I found Ghost.
In the next few lines I will give you a short tutorial on how to setup your blogging routine with Ghost and GitHub Pages.
First, you need a GitHub account so that you can use the GitHub Pages. Everything you need to know is explained here. The process of setting up the GitHub Pages is relatively easy, although at some point it can get a bit complicated depending if you want to have a custom domain name or not. The good news is that you have to do this only once.
Second, install NodeJS on your system. I'm a MacOS user and I used Homebrew. Although this step is also done once, you might want to update NodeJS from time to time. Using Homebrew saves you time.
Third, download Ghost and unzipped it in place you feel comfortable with.
Forth, you go in the directory where you installed Ghost and do:
npm install
... and when the command has completed:
npm start
Now you have your Ghost platform running on:
http://localhost:2368/
... you can write your blogs, install themes, and try whatever functionality Ghost brings you.
Once you are ready you can generate static content from your blog and push it to your GitHub Pages repository thanks to buster. How to install buster you can find on it's website
Assuming you have cloned your GitHub repo and installed buster, what you need to do first (and only once) is to setup buster:
buster setup
... here you need to enter your GitHub repo URL.
To generate static content from your Ghost blog, you can execute:
buster generate --domain=http://127.0.0.1:2368 --dir=path-to-your-github-pages-repo
Then, in order to deploy the pages on GitHub, it suffices to do:
buster deploy --dir=path-to-your-github-pages-repo
... and that's all. Enjoy blogging, enjoy GitHub & Ghost!