Book Image

Getting Started with Ghost

Book Image

Getting Started with Ghost

Overview of this book

Table of Contents (13 chapters)

Creating your theme shell


The very first thing we're going to do is set up a basic theme shell, without any styling applied to it, that you can use as the foundation of this theme and any other you build after it.

The setup file and folder structure

We'll begin by getting the file and folder structure of your theme set up inside your local offline Ghost installation.

Go to content/themes in your local installation and create a new folder for your theme. As we mentioned in Chapter 3, Preparing for Theme Development, we'll name it LearningGhost.

Inside that folder, create five new files. The templates your Ghost theme will use are as follows:

  • default.hbs

  • index.hbs

  • post.hbs

  • tag.hbs

  • page.hbs

As you can see, the names of these template files correspond with the themeable areas talked about previously, with each one being responsible for the presentation of each of these areas.

Note that it's also possible to include an error.hbs file which allows you to create your own page for 400 and 500 errors...