Should I change the Casper template directly or make my own?

Lets say I wish to make small changes to here and there to default.hbs.

What is the best practice? Should I just edit the file directly? What happens when Ghost or the theme has an update? Will my changes be overwritten with the new default.hbs? If I wish to make changes to the default theme should I instead copy it and make my own theme?

I would prefer you to make a copy of your own from the Casper and do the necessary changes over there.

Ah, ok, thanks for the response. Is that because upon updates my changes would normally be overwritten? Is that why it is better to make a separate template?

I guess the easiest thing to do was just sudo cp -R casper mytheme, and update the name entry to mytheme in mytheme/package.json. Then switch to the mytheme using the ghost interface. Then, if I’ve done this correctly I should be able to directly edit the files in mytheme/ to make changes that hopefully won’t be overwritten with updates. It does work for me, but I hope that is in fact best practice too, not sure.

1 Like