Book Image

Getting Started with Ghost

By : Andrew J Boutte, David Balderston, Kezz Bracey
Book Image

Getting Started with Ghost

By: Andrew J Boutte, David Balderston, Kezz Bracey

Overview of this book

Table of Contents (13 chapters)


When John O'Nolan, the founder of Ghost, first published a blog post in November 2012 describing his idealistic and fictional concept of a light, simple blogging engine focused entirely on content publishing, little did he know the chain reaction of events that was about to unfold.

His post immediately garnered massive amounts of attention, creating widespread buzz and a wave of animated discussions across the Web. The immense tide of support that emerged showed that his set of mockups and ideas for a new way of publishing online had legs. John decided to take the leap, and, together with long-time friend and lead developer Hannah Wolfe, he began working on the preliminary stages of Ghost in earnest.

After six months of hard work, the world got its first sneak peek at Ghost when the Kickstarter campaign to fund its ongoing development was launched. Initially, the goal was to raise £25,000—equivalent to around $39,000 USD. The campaign surpassed that amount within twelve hours and went on to raise over $300,000 USD while also drawing excited commentary from prominent authorities within the business and web world such as Forbes, Wired, and TechCrunch. In the process, it also secured investments from heavy hitters such as Microsoft, Envato, and WooThemes.

The first public release of Ghost (version 0.3.1) occurred in September 2013. It has been continually evolving since then with an exciting roadmap of new features scheduled for release all the way through to version 1.0, which is tentatively due in early 2015.

Though still in its infancy, Ghost has set out to tackle two major tasks, both of which it has already positioned itself well to achieve. One is a goal most of us are familiar with from the overall way Ghost describes itself as a platform; the other is one perhaps not yet as widely known.

The first of these goals, as you'll see on the @TryGhost Twitter profile, is to initiate A movement to revolutionize the world of online publishing. Ghost has brought together the insights of seasoned bloggers and experts in cutting edge web technology in order to reimagine the user experience for content publishers. Ghost sees a world in which there are no technical speed bumps for bloggers, allowing them to put all of their focus and energy into the one thing they really want to do: publish content.

In line with this philosophy, Ghost has replaced the bells and whistles of typical publishing platforms with shortcuts and other simplifications geared towards ease of use. It aims to set itself into the background of the user's attention, instead bringing the content they are working on into the fore. It's named "Ghost" for a very good reason: it sees that its job is being done well if it is little more than an opaque specter that is hardly visible as bloggers go about their business.

The second goal, though not something Ghost explicitly sets out to do at its inception, is to usher in a new wave of support for JavaScript-powered web applications built on Node.js. It's very likely that Ghost will act as a driving force that helps take us from the age of PHP (the dominant language of web platforms) to a new paradigm of lightning fast JavaScript and Node.js-driven apps. Just as WordPress propelled the uptake of PHP in its early days, so too may Ghost propel the uptake of Node.js and JavaScript-powered web development.

JavaScript- and Node.js-based apps have been building in popularity in the technical world for some time due to the plethora of advantages they bring, not least of which is speed. Many people consider that PHP is on the downward slope of its dominance while Node.js continues to be one of the fastest growing platforms online. Additionally, we are seeing more and more technologies making a general shift of focus towards JavaScript. Even WordPress, arguably the biggest PHP project there is, has been gradually rolling out increasing numbers of JavaScript-driven features. All things point to JavaScript and Node.js as being the way of the future.

Until now, the relative newness of Node.js-based technology has meant the average blogger or website builder has not been able to partake in these advantages. Arguably, the major roadblocks to enabling people to access the perks of Node.js apps have been the limited availability of hosting and the technical expertise required. Ghost has shaken that stagnation up thoroughly.

The sudden demand for Ghost support has reached the ears of many hosts. In just a few short months, we have seen new automated Ghost installers pop up, hosts that previously didn't support Node.js setting up services to make Ghost installation easy, and brand new hosts specializing purely in Ghost have also emerged. These developments have opened previously non-existent doors to the very latest and most powerful technologies in a way that's accessible to any user no matter what their level of experience.

Ghost is arguably the first in this new generation of web technology to reach widespread public consciousness, bringing with it a wave of new possibility. If web applications of the past could be paralleled with dial-up internet, then we might draw the comparison that Ghost aims to be lightning fast broadband. Where other platforms may grow to accommodate a myriad of use cases, Ghost sets out to remain focused on doing a single job cleanly and efficiently.

This book is designed to show you exactly how to get started with Ghost. You'll learn everything there is to know about using Ghost from working with the admin interface to creating content. You'll get the information you need to choose the right automated Ghost install equipped hosting for your needs. You'll be guided through the more technical processes of manual installation on self-managed servers and local environments. And you'll learn how to design and code your own Ghost themes from scratch, whether for your personal use or to sell in the Ghost marketplace.

By the end of this book, you'll be ready to jump head first into the exciting new world of Ghost!

What this book covers

Chapter 1, The First Steps with Ghost, starts with a tour of Ghost as a blogging platform, Ghost's official hosting platform, and shows you how to use it.

Chapter 2, Manual Installation and Configuration of Ghost, helps you install Ghost locally to develop themes for it. We're going to show you how to do this, and also how to manually install Ghost on a VPS host, as well as discuss the main configuration considerations when hosting your blog.

Chapter 3, Preparing for Theme Development, deep dives into some of the main components you'll want to edit, and setting up your development environment.

Chapter 4, Beginning Ghost Theme Development, helps us set up a template shell for the theme, which is the first step to designing a theme. We'll take a look at all the aspects of a Ghost blog that can be redesigned, and how to prepare your theme shell for them.

Chapter 5, Applying Design Choices and Visual Styling, helps you learn how to apply visual styling and design attractive, responsive Ghost blogs.

Appendix, Markdown Syntax and Ghost Shortcut Keys, contains the list of keyboard shortcuts in Ghost.

What you need for this book

To host a Ghost blog, you need to choose a hosting platform: either based on your own hardware, renting a virtual private server, or via a dedicated Ghost hosting service.

To install manually, you need a computer with Node.js installed using either Windows, Mac OS X, or Linux (Ubuntu and CentOS are demonstrated).

To theme, you can work in any text editor of your choice, though Sublime Text is used throughout the book.

Who this book is for

This book is for anyone looking to start using Ghost. You may have web design experience, or you may be a first time blogger looking to install and theme your very first Ghost blog. Either way, you will learn how to install Ghost on a variety of platforms, and learn how to customize its visual appearance.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "For reference, you can see a sample config.js file in the .zip file that came with this book."

A block of code is set as follows:

server {
    listen 80;
    listen 443 ssl;
    server_name <your domain name>.com www.<your domain name>.com;
    ssl_certificate        /etc/nginx/ssl/<your domain name>/<your domain name>.com.crt;
    ssl_certificate_key    /etc/nginx/ssl/<your domain name>/<your domain name>.com.pem;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;

Any command-line input or output is written as follows:

cd path/to/ghost/folder
mkdir temp
cd temp/
cd ..
sudo cp temp/*.md temp/*.js temp/*.json .
sudo sudo rm -R core
sudo cp -R temp/core .
sudo cp -R temp/content/themes/casper content/themes
sudo npm install --production
sudo rm -R temp

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Both the settings can be accessed via the Settings tab in the top admin menu."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.