Getting Started with Ghost
By Kezz Bracey, David Balderston and Andy Boutte
()
About this ebook
Designed to be fast, streamlined, and eminently customizable, Ghost allows you to focus on what really counts: publishing great content.
This book begins with a detailed overview of the Ghost blogging platform. You'll quickly learn how to use Ghost's sleek yet comprehensive approach to blog management. You can use the official dedicated hosting solution, a third-party host, or take control of everything using a VPS to install Ghost. Ghost's theme API exposes a rich array of customization based on the Handlebars.js template system. You'll learn the basics of Grunt and Stylus, which make theme customization easy, allowing you to create a great looking, responsive blog. By the end of this book, you'll have all you need to create a blog that's easy to use and attractive, enabling you to reach out to your audience like never before.
Related to Getting Started with Ghost
Related ebooks
Instant Hands-on Testing with PHPUnit How-to Rating: 0 out of 5 stars0 ratingsjQuery Mobile Web Development Essentials - Third Edition Rating: 0 out of 5 stars0 ratingsInstant StyleCop Code Analysis How-to Rating: 0 out of 5 stars0 ratingsDeveloping Windows Store Apps with HTML5 and JavaScript Rating: 0 out of 5 stars0 ratingsResponsive Design High Performance Rating: 0 out of 5 stars0 ratingsphpBB: A User Guide Rating: 0 out of 5 stars0 ratingsCocos2D Game Development Essentials Rating: 0 out of 5 stars0 ratingsRefactoring Application Architecture A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsLibgdx Cross-platform Game Development Cookbook Rating: 0 out of 5 stars0 ratingsInstant HTML5 Geolocation How-To Rating: 0 out of 5 stars0 ratingsMulti-Tier Application Programming with PHP: Practical Guide for Architects and Programmers Rating: 0 out of 5 stars0 ratingsSOA Security Rating: 0 out of 5 stars0 ratingsNetworked Graphics: Building Networked Games and Virtual Environments Rating: 5 out of 5 stars5/5Learning NGUI for Unity Rating: 0 out of 5 stars0 ratingsJasmine Cookbook Rating: 5 out of 5 stars5/5Computer Vision with Maker Tech: Detecting People With a Raspberry Pi, a Thermal Camera, and Machine Learning Rating: 0 out of 5 stars0 ratingsSwift 2 Design Patterns Rating: 0 out of 5 stars0 ratingsFlex 3 with Java Rating: 0 out of 5 stars0 ratingsOuya Unity Game Development Rating: 0 out of 5 stars0 ratingsProgressive web app A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsHello! Flex 4 Rating: 0 out of 5 stars0 ratingsMastering PostCSS for Web Design Rating: 0 out of 5 stars0 ratingsMastering OpenCV 3 - Second Edition Rating: 0 out of 5 stars0 ratingsOpenStack Sahara Essentials Rating: 0 out of 5 stars0 ratingsBeginning DotNetNuke Skinning and Design Rating: 0 out of 5 stars0 ratingsjQuery UI 1.7: The User Interface Library for jQuery Rating: 0 out of 5 stars0 ratingsInstant PageSpeed Optimization Rating: 0 out of 5 stars0 ratingsLow Code Development Platforms A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsStencyl Essentials Rating: 0 out of 5 stars0 ratingsLearning Stencyl 3.x Game Development: Beginner's Guide Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding For Dummies Rating: 5 out of 5 stars5/5Introduction to Internet Scams and Fraud: Credit Card Theft, Work-At-Home Scams and Lottery Scams Rating: 4 out of 5 stars4/5More Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 5 out of 5 stars5/5The Designer's Web Handbook: What You Need to Know to Create for the Web Rating: 0 out of 5 stars0 ratingsHow To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5C++ Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsSix Figure Blogging Blueprint Rating: 5 out of 5 stars5/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5The Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5From Nothing Rating: 5 out of 5 stars5/5Learn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5Remote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsThe Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Web Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5Stop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5
Reviews for Getting Started with Ghost
0 ratings0 reviews
Book preview
Getting Started with Ghost - Kezz Bracey
Table of Contents
Getting Started with Ghost
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The First Steps with Ghost
Automated installation of Ghost
A background on Ghost's hosting
Using Ghost's hosting solution
Creating a blog on Ghost(Pro)
Creating your user account
Configure settings
General settings
User settings
Content management
The content management area
Creating and deleting posts
Converting a post to a page
Modifying the permalink or publishing date
Featured posts
Editing existing posts
The post editing area and inline preview
Setting the title
Saving a draft
Adding tags
The word count display
Publishing and unpublishing posts
Converting a post to page, plus permalink and date modification from the post editor
Markdown, image upload, and inline HTML
Image upload
Inline HTML
Hosting Ghost on other providers
DigitalOcean
Amazon EC2
Summary
2. Manual Installation and Configuration of Ghost
Manually installing Ghost on your local computer
Command-line interface and SSH access
Identifying your VPS operating system
Installing Ghost on Ubuntu (VPS and local)
Configuring Ghost on Ubuntu for VPS
Installing Ghost on CentOS (VPS and local)
Configuring Ghost on CentOS for VPS
Installing Ghost on Mac OS X (local)
Configuring Ghost on OS X
Installing Ghost on Windows (local)
Configuring Ghost on Windows
Additional configuration for VPS usage
Pointing a custom domain at Ghost (VPS)
Hosting multiple Ghost blogs on the same VPS
Nginx
Keeping Ghost running (VPS)
The forever process manager
Adding SSL for security
Upgrading Ghost
Troubleshooting
listen EADDRINUSE IN USE
listen EADDRNOTAVAIL
Command not found
Places to find help
Summary
3. Preparing for Theme Development
Handlebars' logicless templating
Double and triple curly braces
Handlebars' paths
The each and foreach block helpers
The if helper
The unless and else helpers
Template tag parameters
Comments
Creating CSS via the Stylus preprocessor
Variables
Stylus syntax
Mixins
Setting up your environment
Sublime Text 2 and Package Control
Installing Stylus and highlighting Handlebars syntax
Creating your project environment
Installing Grunt
Creating a project folder
Installing the project compiler
Set project options
Run the watch task
Minifying JavaScript
Summary
4. Beginning Ghost Theme Development
An overview of the currently available design options
The themeable areas of a Ghost blog
The primary theme design building blocks
Extra design tools
The current exclusions in Ghost
Quick start theme quiz
Default
Index and tag archive
Tag archive
Post and page
Post
Creating your theme shell
The setup file and folder structure
Running the first CSS and JS compile into theme
Adding basic code to template files and package.json
package.json
default.hbs
The wrapper code and {{{body}}} tag
Document
The document
The {{ghost_foot}} tag and extra scripts
Extra notes
index.hbs
post.hbs
tag.hbs
page.hbs
Adding test content and activating your theme
Summary
5. Applying Design Choices and Visual Styling
Stylus files
The import_stylus.styl file
The meta folder
The vars_mixins_etc folder
The styles folder
Applying the quick start theme quiz choices
The default themes
Overall layout – single column
Overall layout – twin column
Use the blog cover image – as site background
Single column layout – header height auto
Single column layout – header height large
Single column layout – full screen header
Index and tag archive
Posts – excerpt, full or trimmed
If excerpt – show post's first image/video/soundcloud
Adding zebra striping – alternate colors every second post
Featured posts – list first above default posts
Applying styles to featured posts
Applying styles to the posts with certain tags
Tag archive
Post and page
If single column layout AND header height full/large – post header style
Post
Adding unique visual styling
Adding icon fonts
Setting image fallbacks
Example design – twin column visual styling
Example responsiveness – twin column design media queries
Summary
A. Markdown Syntax and Ghost Shortcut Keys
Index
Getting Started with Ghost
Getting Started with Ghost
Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2014
Production reference: 1191114
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-518-0
www.packtpub.com
Cover image by Benoit Benedetti (<benoit.benedetti@gmail.com>)
Credits
Authors
Kezz Bracey
David Balderston
Andy Boutte
Reviewers
Hannah Wolfe
İsmail Demirbilek
Gabor Javorszky
Nitin Khanna
Szél Péter
Commissioning Editor
Edward Gordon
Acquisition Editor
Gregory Wild
Content Development Editor
Sharvari Tawde
Technical Editor
Faisal Siddiqui
Copy Editor
Laxmi Subramanian
Project Coordinator
Aboli Ambardekar
Proofreaders
Cathy Cumberlidge
Ameesha Green
Indexers
Monica Ajmera Mehta
Rekha Nair
Production Coordinator
Kyle Albuquerque
Cover Work
Kyle Albuquerque
About the Authors
Kezz Bracey is a web designer and frontend developer from Australia who has been working in the field for the better part of a decade. Theme development kicked off for her in the early days on the Joomla! platform, moving on to creating themes and plugins for WordPress, and she began designing themes for the Ghost blogging platform at its release.
David Balderston had early access to Ghost and started www.howtoinstallghost.com/ with Andy Boutte. From there, he helped to launch other sites related to Ghost, including www.ghostforbeginners.com, www.allaboutghost.com/, and www.allghostthemes.com/. His background in IT helped with troubleshooting problems and portraying them in a way people can clearly understand. He has been around Ghost from the very beginning and has helped many people install and use the Ghost platform.
Andy Boutte worked in the Apple industry for 5 years where he received a dozen certifications and became an Apple certified computer technician and iPhone technician. He currently works for a leading software company, Shopatron, as a DevOps engineer and previously worked there as a quality assurance analyst. This led him to testing Ghost before its initial release and he began writing on www.howtoinstallghost.com and www.allaboutghost.com. With his experience, he has developed the unique skill of breaking down technical topics into terms that are easy to understand, which he utilizes in his writing today.
About the Reviewers
İsmail Demirbilek is a software engineer and web enthusiast living in İstanbul, Turkey. He is working with cutting-edge web technologies since his college days at Istanbul Technical University back in 2012. He is mainly focused on frontend engineering besides being a Big Data search engineer at Egemsoft.
He is also an open source maintainer. He has published many projects in terms of giving back to the community. He is currently working on several web projects.
Gabor Javorszky is one of the core developers on Ghost. He's been in the web industry for the past 10 years. It all started with a bespoke Flash website for an event and a forum he's written by hand. Later on, WordPress became the tool of his choice with a small sidestep to another CMS while working at an agency. Everything he knows he learned all by himself, reading articles, trying, and building things, and figuring out what works and how.
Currently he is the senior developer at Electric Studio, a small WordPress only web design agency in Oxfordshire, the United Kingdom.
He has also reviewed Getting Started with Zurb Foundation 4 for Packt Publishing earlier this year.
I'd like to thank the entire team at Ghost for helping me through the obscure code parts, especially Hannah Wolfe! I'd also like to thank the team at Packt Publishing for guiding me through the book review process.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
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