Introduction to Ghost

After reading this article, you will understand:

  1. Key features of Ghost
  2. How to get Ghost running

Ghost is an open source publishing platform that runs on Node and is very easy to use. You simply install, run it, and add new posts using your browser. This is similar to Wordpress, but purely focuses on blogging.

A non-profit organisation called the Ghost Foundation overlooks the project; and they also provide hosting that runs Ghost on their server. Instead of hosting it yourself, you can simply pay US$10 a month to have your blog running on their server. The profits from this will go back into the Ghost Foundation, so view it as a donation more than anything else.

Key Features

This will sound vague, but the best feature of Ghost is that it is very easy to use, it takes a minute or two to get it running, and the interface is clean and neat.

Admin panel

My previous blog was done in jekyll, which was great for a while. It was troublesome, however, to update - I'd open my editor, make a change, commit and push the changes to my git repository, ssh into my production server and pull the changes down, run jekyll serve and close everything again. Yes, these steps could be automated, but it is still a lot of work, for what is, maybe, just fixing a typo.

Ghost provides an admin panel that you can access directly in the browser. Here, you can view existing posts and drafts, create new posts, add users, and manage tags and navigation.

The Ghost admin panel

Split-screen editor

With Ghost, you write your posts in Markdown. Ghost provides you with a split-screen editor that updates as you type, so you can see the 'preview' of the post in real-time.

The split-screen editor in Ghost

Multiple Users

If you navigate to Settings > Users, you can add new users who can login to your blog and create content.

Customizable

The default theme (casper) is responsive. But you can also create your own theme.

You can easily integrate Ghost with other services such as Disqus or Google Analytics by simply adding the script into the templates.

MIT Licence

The MIT Licence is, dare I say, the most permissive one out of the established licenses (Apache, GPL), and allows you to use the software however you want.

Setting Up

First, download the latest version of Ghost.

Download Ghost

Move the .zip file to the root directory of your application and unzip.

$ mv ghost-0.5.10.zip /the/root/dir/
$ unzip ghost-0.5.10.zip
$ rm ghost-0.5.10.zip

Install the required Node modules.

npm install --production

Start Ghost.

npm start --production

The first time npm start --production runs will be a bit slower, since it must create tables in the database to store all the information. Subsequent startups will be faster.

Go to http://[YOUR-IP]:2368/ghost to set up your site. You'll be prompted to provide a name for the blog, your name, and a username and password to log-in with.

Setting up Ghost for the first time

After the set-up, go to http://[YOUR-IP]:2368 and see you blog. Go to http://[YOUR-IP]:2368/ghost and login to access the admin panel, where you can write new post and edit old ones.

Default Ghost homepage

This might get your blog up and running, but to ensure the links work properly, we must edit the config.js file, which is a copy of the config.example.js file created when you ran npm start.

You'll find:

config = {
    production: {
        url: 'http://my-ghost-blog.com',
        mail: {},
        ...
    },
    ...
}

Just ensure the url matches the domain name of your blog, this is important. You can also configure your mail settings using the mail property, but that's not vital to running the blog.

Restart Ghost if required, but that's it! That's you setting up Ghost in your production server!

In the next articles, we'll look into themeing, using Git with Ghost, plus much more. Stay tuned!

comments powered by Disqus