Ghost CMS Heroku new theme added by git not displaying

259 Views Asked by At

I added a new theme to ghost cms, It displays in the listing on my local machine, but on my heroku instance I cant see it in the list of available themes.

Is there a way to restart Ghost in heroku, or a way of forcing it to appear? Ive tried restarting the dynos, and redeploying to no avail.

2

There are 2 best solutions below

0
Graeme Paul On BEST ANSWER

@chris I solved the issue, it turns out my content path in config.production.json was wrong. It wasnt looking in the right place for the themes

it was

 "paths": {
      "contentPath": "content/"
  },

and it needed to be

  "paths": {
      "contentPath": "content"
  },
2
Chris On

How did you install the theme? The instructions make it look like this involves dropping files into a directory (either using the admin UI or manually).

Heroku's ephemeral filesystem isn't compatible with that:

Each dyno gets its own ephemeral filesystem, with a fresh copy of the most recently deployed code. During the dyno’s lifetime its running processes can use the filesystem as a temporary scratchpad, but no files that are written are visible to processes in any other dyno and any files written will be discarded the moment the dyno is stopped or restarted. For example, this occurs any time a dyno is replaced due to application deployment and approximately once a day as part of normal dyno management.

Any changes you make to the filesystem will be lost when the dyno restarts, which happens at least once per day. (Maybe counter-intuitively, restarting your dyno will have the opposite effect from what you want.)

You'll have to commit the theme files to your Git repository and deploy the new code to Heroku. In addition to making the change persist across dyno restarts, this also makes the new theme available to all dynos (if you scale beyond one).