DevelopmentA Beginner’s Guide to Ghost

A Beginner's Guide to Ghost

The Ghost team knew that there were many people whom WordPress was serving poorly. Their perception: Some people just want to blog. It's a "friendly" blogging platform that offers an alternative to WordPress's kitchen sink approach.

WordPress is a workhorse. I love it like lots of people do. I’ve used it to build everything from full ecommerce shops to simple micro sites.

But am I in too deep? I’m acclimated to the WordPess environment. For a newcomer, the way WordPress has metastasized into “the operating system of the web,” as WordPress founder Matt Mullenweg put it, can obscure its essential function as a publishing platform.

I’ve rarely if ever gone through a WordPress install without some mildly technical set up and configuration. For the initiated, this can be accomplished in minutes. For the uninitiated, these can become hurdles that loom large.

  • What’s a .htaccess file?
  • How do I use ssh?
  • Where is my WordPress install located?
  • Why does MySQL keep shutting itself down?

If you’ve spent any time on forums (DaniWeb and StackOverflow are my faves), then you know there’s a heavy dose of “noobish” questions like this out there. Before we crucify the noob, let’s consider his/her problem. I’ll be the first to admit, they were my problems too.

The steep learning curve at the outset is something that the tech community should be deeply invested in addressing, as it’s a major hurdle to membership. WordPress has taken some steps in the right direction with WordPress.com, but it can be as unwieldy as its open source twin to customize elegantly.

Enter Ghost. The Ghost team knew that there were many people whom WordPress was serving poorly. Their perception: Some people just want to blog.

The head of the Ghost team, John O’Nolan is a former head of the WordPress UI Group. His radical product bears the WordPress-esque self-deprecating slogan: “Just a Blogging Platform.”

Ghost doesn’t aim to spook. It’s a “friendly” blogging platform that offers an alternative to WordPress’s kitchen sink approach. Their default theme is called “Casper,” enough said.

It’s also built entirely with node.js, a fast, powerful, and scalable platform that’s powering the most cutting edge sites on the web (PayPal, LinkedIn, Yahoo, and Microsoft among them). Without getting into the gritty details, know that you can have Node run your personal blog. No more PHP.

So you want to try it out? OK, let’s get into it.

Hosting

For those of you who want Ghost today, Digital Ocean is already making it easy for you. If you haven’t tried them yet, try them. Super fast SSD hosting, pay by the hour, $5/mo. micro instances, and plenty of easy preset images and applications that can be installed behind the scenes.

Ghost is one such preset image. When creating a “droplet” (Digital Ocean speak for a server), select the pre-configured “Ghost” image from the list. It’s found here:

Ghost Getting Started

Click “Create Droplet” and wait 55 seconds (if you’re wondering what size server you need, start with the micro instance — it’s served my personal blog just fine from the day it was born).

You’ll get an e-mail from Digital Ocean to the email that you used to register your account. It will include the IP The first thing you’ll want to do is navigate to that ip in your browser. It should look something like this:

Welcome to Ghost

Alright! Now you’re the proud owner of a Ghost blog. Navigate to ‘YOUR.IP/ghost’ and set up your admin account (note: ghost only supports one user at this time; multi-user ghost blogs are coming in future releases).

Ghost Admin Setup

Now you’re on the inside!

Click around a bit and get familiar. I’ve found the best thing about Ghost so far is the writing interface and its markdown (a kind of shorthand for styles and elements).

Want an image? Open the editor and hit Ctrl+Shift+I, then drag and drop an image from your desk top into the editor. Want a link? Highlight the text and hit Ctrl+Shift+L.

The markdown can take a bit of getting used to, but after a post or two, I already find it to be pleasurable. What’s more, it’s fast.

For the first time, I can imagine writing for my blog on my blog! There’s no “visual” vs. “textual” interface in WordPress; the preview panel automatically renders the markdown in real time. You can preview what you write as you write.

You’ll also want to check out the Settings tab, where you can set a background image, blog name, etc.

Now that you’re in, let’s start hacking Ghost.

Get Hacking

The email from Digital Ocean will contain the root password as well as an ssh command that looks like:

ssh [email protected]

Open your terminal app (yes, dreaded terminal), or open up any sftp client (I use Cyberduck). In terminal, you can just copy and paste your ssh command from the line mentioned above, type yes to save server key in “known hosts,” and then copy and paste your password from the email when prompted and hit enter again.

You’ll know you’re in when you appear as “root@servername”

To Switch to the directory where ghost is stored type:

cd /var/www/ghost/casper/themes/casper

The “casper” folder contains all you need to get started augmenting the functionality of your ghost install.

Implement Google Analytics

Ghost promises to release an analytics dashboard in their Christmas release. For now, we have Google Analytics. To add Google Analytics tracking to your ghost blog, open ‘default.hbs’ and paste your tracking script from the Google Analytics dashboard just before the closing ‘body’ tag.

To open the file, type:

sudo nano default.hbs

Paste in the tracking code above the closing ‘body’ tag, and then hit ctrl-X and then type “Y” to exit and save changes.

Go check the Google Analytics real-time dashboard and watch the magic happen.

Implementing Disqus Comments

Disqus (pronounced “discuss”) is a beautiful social comments widget that works just about anywhere. Go create an account, customize your implementation, then copy and paste the “universal code” version of the implementation into “post.hbs” file before the closing ‘section’ tag that closes the “post-content” section.

To open post.hbs from terminal, type:

sudo nano post.hbs

Make your changes, save as before, and hard refresh your blog with “shift+Refresh.” Now you’ve got comments on your Ghost blog.

Get Social Buttons

Another really useful javascript widget is AddThis. It adds a suite of social buttons, a content recommendation engine, and even displays share buttons predictively.

AddThis

Select the widget you’d like to implement, customize to taste inside the AddThis dashboard, and paste the code into the the post.hbs file, this time pasting the code just above the open ‘footer’ tag.

Save and refresh your blog in your browser. Boom. You have social buttons.

If you got this far, Ghost’s homepage and documentation will be useful for further questions.

Happy Halloween and happy Ghost hacking.

Resources

The 2023 B2B Superpowers Index

whitepaper | Analytics The 2023 B2B Superpowers Index

8m
Data Analytics in Marketing

whitepaper | Analytics Data Analytics in Marketing

10m
The Third-Party Data Deprecation Playbook

whitepaper | Digital Marketing The Third-Party Data Deprecation Playbook

1y
Utilizing Email To Stop Fraud-eCommerce Client Fraud Case Study

whitepaper | Digital Marketing Utilizing Email To Stop Fraud-eCommerce Client Fraud Case Study

1y