Boinx's Blog

Stepping stone

Creating a Ghost Custom Theme

To create your own custom theme for Ghost, navigate to your Ghost folder. Under content/themes create your theme folder.

Basic Structure of a Ghost theme

images

    1. Assets - this will contain all the resources you’ll be using for your site.
    2. Partials - contains different template files that can be included to your main template files. Examples are Header and Footer.

Required files for your custom theme:

default.hbs

images

This template file contains the html tag, head tag and body tag. This is where you link up external scripts and stylesheets.

index.hbs

images

This is the template file for your homepage.

package.json

images

This is where you set the name and the version of your theme that will appear when selecting a theme in the admin dashboard.

posts.hbs

images

This is the template that will be used by all your posts.

My Basic Custom theme

Homepage

images

Post

images

Here’s a link for an overview on how the Ghost theme works and showing what are the available handlebar expressions and helpers for your theme.