CSS feature_image_caption not showing in Ghost theme 😤

TL;DR — If you are developing a Ghost theme and you have certain handlebars not working properly, make sure to check the Ghost engine value in the package.json file.

Ish Sookun

1 min read
Theme development on Ghost v4
Theme development on Ghost v4

I started creating a Ghost theme for my blog last Friday. Everything went on smoothly with all bits and pieces falling perfectly in place, except for one handlebar not behaving as it should.

Last month the Ghost developers announced a new feature, the possibility of adding a caption to the post feature image. Previously, I would add photo credit for the feature image inside the blog content. With the new feature it'll be an easier job and certainly good SEO since the alt tag for the image also is available.

That being said I was hyped to use this feature whenever I would update my blog theme. So, when creating this new theme for my blog, certainly I would think of including the feature_image_caption handlebar helper.

<figcaption>
  {{ feature_image_caption }}
</figcaption>

Like I said, everything worked smoothly except for the above code and I would not understand why. I Googled, read the forum posts but nothing pointed to the right direction.

Then, I noticed that I in my package.json file I had v3 instead of >=4.0.0 as the Ghost engine value. I used files from a previous Ghost theme which I wrote and I forgot to change this value. A quick fix and the feature_image_caption appeared as expected.

Damn! This is the reason why it is a good practice to start Ghost theme development with the Casper theme as base template.