Extend existing Theme with Sub-Theme in v3

Hi all,

I would like to reuse the whole Casper Theme and just change one or two background colors. It seems to be overblown to copy the whole theme to just change two lines of CSS. Is there a way to extend an existing template with a new template? I don’t want to place or change files inside the main theme to keep it updateable.

Or do I need to upload a custom css file and load it manually in the header section of ghost (via injection in backend)?

Thanks!

UPDATE: Is the concept “child theme” (as for wordpress described here) existing also in ghost?
Answer: No it does not. See this comment

1 Like

Hi,
You can use Code Injection to write few lines css if you don’t want to edit the theme files.

Thanks

1 Like

Haha thanks! :slight_smile: Obviously this is even the better approach than trying to include another tiny file! :man_facepalming:

But in general: Does your reply mean that theme inhertiance does not exist in ghost?

:grinning: :grinning:
You can’t add an extra file without editing theme files

No I mean is it possible to have a casper_sub theme (as a custom theme), only adding/changing values in casper but inheriting all casper files without the need to copy them to my casper_sub theme?

Like a child theme in wordpress (see Child Themes | Theme Developer Handbook | WordPress Developer Resources)

You are correct, Ghost does not have the concept of Child Themes

2 Likes