Creating a custom theme

Ghost themes

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

If you need something a little more customised, it's entirely possible to build on top of existing open source themes, or to build your own from scratch. Rather than giving you a few basic settings which act as a poor proxy for code, we just let you write code.

<script>
  window.$docsify = {
    repo: 'docsifyjs/docsify',
    maxLevel: 3,
    coverpage: true
  }
</script>

Marketplace

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

Life is amazing with boots
Photo by Fallon Michael / Unsplash

Theme development

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: {{author.name}} 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 u
  • cused in the context of viewing the home page.
  • and so on

We've got full and extensive theme documentation which outlines every template file, context and helper that you can use. You can also get started with our useful starter theme, which includes the most common foundations and components required to build your own theme.

Themeix

We create professional website templates for ghost cms, jekyll, WordPress and Blogger. Discover our largest collection of beautiful themes to build any website you want

Themeix

Do you have any question to us?

Contact us and we'll get back to you as soon as possible.

You've successfully subscribed to Doxy - Ghost Documentation Theme
Great! Next, complete checkout for full access to Doxy - Ghost Documentation Theme
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.