thoughts, stories and ideas

Ghost is truly the most amazing blogging solution on the market.

quasiStudio co-founder Renato has already written a how-to on Hosting Ghost on CentOS 7, and we wanted to extend our support by leaving this official post here and adding a couple more useful pointers.

Ghost comes with a beautiful default theme called Casper, which is designed to be a clean, readable publication layout and can be adapted for most purposes.

In other words, you will have beautiful styles, navigation and homepage structure, but there is no search option, social icons are hidden in mobile view, and menu is pretty much not responsive.

However, Ghost can also be completely themed to suit your needs.

Rather than just giving you a few basic settings which act as a poor proxy for code, Ghost lets you write code.

There is a huge range of both free and premium pre-built themes which you can get from the Ghost Theme Marketplace, or you can create your own from scratch.

Anyone can write a completely custom Ghost theme with some solid knowledge of HTML and CSS

Before you start writing, you can download the Ghost native desktop app here.

Ghost themes are written with a templating language called handlebars, which has a set of dynamic helpers to insert your data into template files. For example: {{}} outputs the name of the current author.

The best way to learn how to write your own Ghost theme is to have a look at the source code for Casper, which is heavily commented and should give you a sense of how everything fits together.

  • default.hbs is the main template file, all contexts will load inside this file unless specifically told to use a different template.
  • post.hbs is the file used in the context of viewing a post.
  • index.hbs is the file used in the context of viewing the home page.
  • and so on

Check out Ghost's full and extensive theme documentation which outlines every template file, context and helper that you can use.

If you want to chat with other people making Ghost themes to get any advice or help, there's also a themes section on the public Ghost forum.