Creating a custom Ghost theme

Ghost comes with a beautiful default theme that you can easily adapt for most purposes or build a custom theme to suit your needs.

Creating a custom Ghost theme
Creating custom Ghost themes is easy!

Ghost themes

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

If you need something more customized, it's possible to build on top of existing open-source themes or build your own from scratch. Rather than giving you a few basic settings that act as a poor proxy for code, Ghost lets you write code.

By the way, we are using a customized version of the default Casper theme.

Marketplace

There is a vast range of both free and premium pre-built themes, which you can download from the Ghost Theme Marketplace:

Ghost theme marketplace screenshot
Anyone can write a custom Ghost theme with solid HTML and CSS knowledge.

Theme development

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

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

  • default.hbs It 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...

Ghost has extensive theme documentation outlining every template file, context, and helper you can use. You can also get started with Ghost's great starter theme, which includes the most common foundations and components required to build your theme.

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.