Convert cloned theme into child theme
HubSpot introduced child themes back in April 2021.
Before this new feature, we often cloned the original theme folder to customize or edit a theme purchased/downloaded from the marketplace.
The problem with this approach is that the cloned folder is completely disconnected from the HubSpot marketplace, meaning you won't get any future updates when the theme provider pushes a new version.
The good news is, the new child theme feature allows us to reconnect the cloned theme folder back to the original theme folder.
Here are the steps:
- Open Design Tools
- Navigate to the original theme folder inside the @marketplace folder (in this example, we're using Hatch Lite)
- Right click > Copy path
- Open theme.json file inside your cloned theme folder
In this example, Hatch_Lite child is our cloned theme folder.
- Type the following line of code into theme.json
"extends" : "[path goes here]"
Note: Replace [path goes here] with the path you copied from the original theme folder.
Once updated, your extends should look like as follows: