Handlebar for ghost version number

I’m running a number of ghost sites and it would be really handy when upgrading if I could see what version of ghost the site was running.

I’ve tried adding a “version” key to the package.json file of the theme and adding handlebars to display it, but that doesn’t seem to work.

In package.json:

"config": {
    "posts_per_page": 15,
    "version": "4.9.4"
}

In default.hbs:

{{@config.version}}

Is there a way to do this?

Paul

It’s not directly available to handlebars and you can’t provide custom properties to themes either.

There are a couple of ways to see the current Ghost major+minor version though:

  1. check the <meta name="generator"> tag output on any front-end URL
  2. fetch yoursite.com/ghost/api/admin/v4/site/

The patch version is not available publicly, you’d need to be authenticated as an admin.