1. Code
  2. JavaScript
  3. Node

Keeping Up with Ghost 0.5

Scroll to top
6 min read

On August 11th, the open source blogging upstart Ghost released a major incremental update, Ghost 0.5 MSR1 (Ghost began as a Kickstarter project in 2013 by founders John O'Nolan and Hannah Wolfe and has grown quickly since then). It's available as an open source download or you as a managed blogging service at Ghost.org. Unlike WordPress, written in PHP, Ghost is written in Node.js.

Final product imageFinal product imageFinal product image
What You'll Be Creating

I'm a longtime WordPress user and the platform is admittedly slow and cumbersome. WordPress recently raised $160 million in venture funding, so I expect the platform to improve in greater leaps and bounds; however, I was eager to try Ghost as a new, lightweight alternative. 

I've also been writing a lot lately at Medium.com, what some are calling a platisher. While Medium offers a beautiful responsive design and some great writing features, it doesn't offer as much control and portability as I'd like. Ghost aspires to offer the simple, sophisticated writing environment of Medium in a self-hosted, open source package. Already, there is a Medium-inspired theme for Ghost which I'll demonstrate installing in this tutorial (and certainly there are many for WordPress). 

In many ways, Ghost delivers - but like delicious cookies baking in the oven, it needs a bit more time. First, let's talk about what's new in Ghost 0.5 MSR1.

What's New in Ghost 0.5 MSR1

There are three major changes in the latest release:

Firstly, Ghost now allows multiple users, so you can have more than one author on your blog. Obviously, this is a critical catch up feature to other blogging apps such as WordPress. It also opens Ghost up to a broader array of potential uses.

Secondly and most interestingly, Ghost now offers a public JSON API: "Every single feature which is in Ghost is available to third-party developers. Not just a subset; Everything." Recently, blogging evangelist Dave Winer wrote about the importance of writing platforms to be open, the Ghost API is an important step in creating more open, portable platforms for writers.

Thirdly, the Ghost administrative interface was completely re-written in Ember.js: "Ghost is now a fully-featured client-side JavaScript application. Everything you do in the browser happens in real time. We're now able to start building user-interface components which look and feel like what you might expect from a desktop (or mobile) operating system." You can learn more about Ember in Tuts' Resources to Get You Up to Speed in Ember.js.

And there is a long list of incremental feature improvements:

  • The Ghost default theme Casper 1.0 has been given a "massive update with beautiful new user profile pages, full-bleed homepage cover images, restructured navigation, improved mobile styles, and a massive improvement to typography" There are also new improvements to the theming API for developers.
  • The installation screen has been improved
  • OAuth support has been added for secure authentication
  • System emails are now delivered with a newly designed HTML email template
  • Privacy documentation is now provided in detail for every feature in the software.

Also, the Ghost development team is moving to 2-4 week release cycle which should allow for more rapid incremental development of the platform.

Getting Started with Ghost

If you'd like to quickly try out Ghost, you can sign up for a free trial account at Ghost.org. If you'd like to install Ghost yourself, Digital Ocean has a pre-built image which can get you started in minutes.

Note: Ghost runs as on nginx by default. If you're used to the flexibility and ease of administering Apache sites, there's some new complexity to integrating Ghost into your existing environments. I chose to run Ghost on a new cloud server instance.

The Ghost Home Page After InstallThe Ghost Home Page After InstallThe Ghost Home Page After Install

To configure Ghost, just visit your website admin page, e.g. point your browser to http://yourdomain.com/ghost:

Right away I noticed the speed of the new administrative interface. The new Ember-based dashboard makes WordPress seem like a very slow dog. Here's what you'll see when you enter the Ghost Dashboard:

The Ghost Administration Content PageThe Ghost Administration Content PageThe Ghost Administration Content Page

To fully configure Ghost, you'll need to log in to your droplet using the root password sent to you by Digital Ocean (assuming you're self-hosting).

ssh root@yourdomain.com

Edit the config.js file and customize the URL setting to your custom domain name:

nano /var/www/ghost/config.js

Configjs Customize Your URLConfigjs Customize Your URLConfigjs Customize Your URL

Restart ghost as an Ubuntu service:

service ghost restart

To configure your email services, Ghost has a helpful guide here. I'm using Mailgun's SMTP services. There's even a Mailgun Ghost configration helper:

The Ghost Mailgun Configuration HelperThe Ghost Mailgun Configuration HelperThe Ghost Mailgun Configuration Helper

I configured my mail service manually:

1
mail: {    transport: 'SMTP',    options: {        service: 'Mailgun',        auth: {            user: 'postmaster@tryghosttest.mailgun.org',            pass: '25ip4bzyjwo1'        }    }}

Again, you'll need to restart Ghost to activate the changes. If you make any typos (as I did), you may find that Ghost restarts but that your blog will show an unfriendly nginx error.

Here's an example of the new HTML email template in 0.5 MSR1:

The Ghost 05 MSR1 HTML Email ThemeThe Ghost 05 MSR1 HTML Email ThemeThe Ghost 05 MSR1 HTML Email Theme

The Ghost Settings are pretty simple and straightforward:

The Ghost Dashboard Settings PageThe Ghost Dashboard Settings PageThe Ghost Dashboard Settings Page

Installing a Custom Theme

For this tutorial, I'll install the Ghostium theme, a Medium-esque theme for Ghost, by Oswaldo Acauan. To install it, login via SSH and follow these steps (installation instructions are also available here):

1
apt-get install gitcd /var/www/ghost/content/themesgit clone https://github.com/oswaldoacauan/ghostium/ "ghostium"

To configure Ghostium, we need to edit the themes handlebar configuration file:

1
cd /var/www/ghost/content/themes/ghostium/partials/customnano config.hbs

I added settings for Google Analytics and Disqus. Again, in comparison to WordPress themes, theme configuration occurs in the console, not the administrative user interface:

Configure Ghostium Analytics and DisqusConfigure Ghostium Analytics and DisqusConfigure Ghostium Analytics and Disqus

And, you have to customize the navigation bar in navigation.hbs and meta tags in meta.hbs.

Then, visit the Ghost dashboard settings page and change your theme over:

Select the Ghostium themeSelect the Ghostium themeSelect the Ghostium theme

Each time you make a change to these theme configuration files, you must restart the Ghost service to see them in effect.

The final results though are quite striking. Here's my home page with the Ghostium theme. It's clean, responsive and elegant, just as I'd hoped.

My Ghost home page - Healing from a Difficult BreakupMy Ghost home page - Healing from a Difficult BreakupMy Ghost home page - Healing from a Difficult Breakup

Early Impressions

There's a lot to like about Ghost 0.5 MSR1. The new Ember-administration system is refreshingly responsive and fast. I wish my WordPress Dashboard was anything like this. 

With its latest release, Ghost is a platform nearly ready for major customization and extension - but it's not ready yet. The API is a major step forward but the documentation isn't published yet. Similarly, the plugin framework (called Ghost Apps) is still in development. So, at the moment, building themes is all that you can do unless you want to hack in the codebase directly. This is probably most appropriate for developers who want to contribute to the Ghost open source effort.

You can find the Ghost Developer Documentation here and their developer blog.

The potential for Ghost going forward looks bright. Would I switch today? Perhaps for a small project like the one I showcased above - but not for a serious site, not yet. Maybe next year. Ghost is definitely a platform worth watching.

What's Next for Ghost?

The public Ghost Development Roadmap on TrelloThe public Ghost Development Roadmap on TrelloThe public Ghost Development Roadmap on Trello

Learn more about Ghost's development roadmap here. It uses a public Trello board to manage issues with the development team. Now that the team has moved to a 2-4 week release cycle, changes are arriving rapidly. A recent peek showed upcoming features include sitemap generation, support for Facebook's Open Graph tags, improved RSS support, autosaving drafts and custom permalinks. 

While Ghost is maturing rapidly, it's also still in catch-up mode; all of these are features that WordPress has today either natively or through plugins.

Ghost has a tremendous amount of potential and it's nice to have well-designed alternatives to WordPress. I hope you'll give Ghost a try. 

Please feel free to post corrections, questions or comments below. I'd be especially interested in alternate approaches. You can also reach me on Twitter @reifman or email me directly.

Related Links

Here are some related Ghost tutorials that you may be interested in, all available on Tuts+:

Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.