Best practices for modifying themes


Firstly, I love this community and the Ghost platform! So, thank you all.

So, question— I’m considering buying a theme and modifying the Casper theme. I understand about git installing a theme into the them directory.

So, my question, what is the best practice (I’m not a developer. I don’t code, just tweak things) for updating Ghost and themes that have modifications?

Example: I have my own “branch” of Casper running and I have made modifications (eg, the 45 pixel height limit seems silly, IMHO). But, I also want to continue to upgrade the theme as changes and features are added. I also want to have an AMP template and some page-specific hbs files. If I just do a straight upgrade, I’m going to lose all the modifications (is my understanding).

OR, I have a theme that I’ve installed and lightly modified (similar changes as listed above). The theme will update over time to include features and address changes in the Ghost platform. What’s the best way to “update/upgrade” everything without losing everything each time?

I know “git” can be powerful, and I’m willing to learn, but I’m an amateur beyond git cloning.

Thanks in advance!

1 Like

Bump cuz I’m bad at this.

Hi @em_div! I believe this was actually asked recently here, if you wanted to have a look?

Kevin had said,

If you used git to fork Casper before applying your changes then you could merge upstream changes in and rectify any merge conflicts.

Otherwise it will be a case of downloading the latest version of Casper and re-applying your customisations manually.

Yep, I did see that already. I guess I understand the comments but the specific step by step process is where I’m struggling. I can keep googling git commands and see what comes up.

This is a Git question which is way too high-level so just YouTube it :)

Then my first advise would be fork something, and then commit in the master branch to start. Don’t go to fast with branching / PR / rebase / squash.

I did some customizations on Casper here if you are curious. Cheers!

1 Like

Thanks @askpascalandy! Ghost has so many awesome parts to it. I love it. Now I gotta learn git beyond “git clone” downloads/installs.

1 Like

If you have the official Casper’s GitHub repository as upstream remote of your local repository, when pulling from upstream to update Casper, this doesn’t touch your created branch because upstream doesn’t have that branch.

After the Casper update you can rebase your branch on top of the updated master. With git status you can see files affected by possible conflicts, and resolve them.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.