Publish with Ghost on Github Pages

Aishik Saha
Aishik Saha
Published in
2 min readJan 1, 2017

Ghost is a fully open source, hackable platform for building and running a modern online publication.

With more blogging platforms than there are fingers on your hands, choosing the right one can be quite a cumbersome ordeal.

Here is a platform that is simple, future-ready and gives control to the user.

Now let’s build. The following steps are meant for Mac and Linux users. Still using Windows? There’s never been a better time to switch to Linux.

Let’s start.

  1. Install pip and NodeJS if you don’t have them already.
  2. Install Buster (a static site generator).
pip install buster

3. Download a tiny ~4mb zip.

4. Extract the zip and open this directory in your terminal.

npm install
npm start

5. Now setup your blog at http://localhost:2368/ghost. Give it a nice name.

6. Generate the static files.

buster setup
buster generate

Yaay! Your blog is all set. It’s time to publish it on Github Pages.

Publish on Github Pages

  1. Head over to GitHub and create a new repository named username.github.io, where username is your username on GitHub.

2. Push static files to Github.

cd static
git init
git remote add origin git@github.com:USER/USER.github.io.git
git add --all
git commit -m "Ghost Ready"
git push -u origin master -f

Done. Your blog is now live at USER.github.io

Publishing new posts

  1. Open the terminal from the blog folder.
npm start

2. Log in and post at http://localhost:2368/ghost.

3. Generate static files and push.

buster generate
cd static
git add --all
git commit -m "New Post"
git push -u origin master -f

Why use this method?

  • It’s free.
  • Ghost is open source, has built-in SEO and AMP.
  • Github Pages has SSL and a CDN.
  • Ghost is used by NASA. Enough said.

--

--

Aishik Saha
Aishik Saha

Engineer. Interested in machine learning, cloud, containers and open source. Built Slyme (https://5ly.me).