I just moved from blogspot to Ghost bloggin platform. Mainly because of its simplicity and how minimal it is. I'm using the self-hosted option as I have to write posts on my localhost instead of going to Ghost website itself because its free. Additionally, because I like doing things the hard way :D That's how I roll.
Using Github Pages to host my blog is free and convenient. There is a lot that can be experiment here such as installing themes, plugins etc because it is open source. I write most of my posts in Markdown format because it looks more readable in raw and I can write faster. If you are one this kind, you would want to try Ghost to blog.
This guide uses Ubuntu 14.04 as a prerequisite.
Install node.js and npm.
sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
Download and install Ghost. Checkout this link for latest release and replace wget command.
wget "https://ghost.org/zip/ghost-0.4.2.zip" unzip ghost-0.4.2.zip -d ghost cd ghost cp config.example.js config.js npm install
Start Ghost in 127.0.0.1.
127.0.0.1:2368/ghost for your Ghost Admin panel.
Create a new post if you'd like to.
Hosting on GitHub Pages
Install Git and setting up an account for git command environment. Please create an account on Github first before doing so.
sudo apt-get install git git config --global user.name "YOUR NAME" git config --global user.email "YOUR EMAIL ADDRESS"
Go to Github.com and create a new repository. Name it something like yourname.github.io. This will be your Github static website URL.
After that, create a new branch called gh-pages. This branch will host your static webpage.
Buster is a tool for generating a static site for Ghost. You can't literally push your Ghost source code into your repository as Github Pages won't render it. Instead, create a static webpages in order for Github Pages to host. There will be no admin backend for this. You'd want to write your posts on 127.0.0.1.
Install pip. A python package management.
sudo apt-get install python-pip python-dev build-essential pip install --upgrade pip sudo pip install --upgrade virtualenv
Install Buster via pip
pip install buster
Generate Ghost Static Site via Buster
Start your Ghost blog on 127.0.0.1 by
npm start. While it is still running, create a new directory outside of your Ghost directory and call it blog-static or something.
cd into it.
When prompted, enter the address of the GitHub repository URL you just created.
Start generating static site.
buster generate --domain=http://127.0.0.1:2368
This will generate a static site based on already running Ghost on 127.0.0.1 under a newly created directory called
static. Switch into the subfolder by
cd static and do the following to push static site to your Github repository.
Inside blog-static/static dir,
git add --all git commit -m 'commit message' git push -u origin
Alternatively, you can just skip the git command and use
buster deploy in the static directory and buster will upload it.
Adding a Custom Domain
- Buy a domain (eg. http://domain.com)
A Records, point
- Add a
CNAME Recordspointing subdomain such as
- Push a CNAME file in your repository using the following command:
buster add-domain <domain here>. This will create a file called CNAME in
- Make sure domain doesn't have
http://when adding it
- Make sure domain doesn't have
npm starton aimanbaharum-blog/
- write posts on
- switch to static dir
- while running
buster generate --domain=http://127.0.0.1:2368(creates static site in /static)
- Or in
git add --all git commit -m "message" git push -u origin