A child theme is a copy of an original parent theme. You can edit the child theme without altering the parent theme. You can create child themes from HubSpot themes, marketplace themes, as well as custom themes.
theme.json
- this will include an extends statement for linking to the parent theme.child.css
and child.js
- these are empty CSS and JS files. Code added to these files will only affect the child theme.standard_header_includes
HubL variable. This usually includes a “base” or “main” template file. You can view an example of this on our boilerplate.extends
statement, using a value of the path of the parent theme.responsive_breakpoints
, if they are present).extends
statement to line 6 (or 14, or the appropriate line for your theme), using a value of the path of the parent theme.@marketplace/parent/theme/templates/about.html
you can create /child/theme/templates/about.html
and make your edits to the new file. The new file will take effect instead of the inherited file. This applies to your fields.json file as well as other files in the theme.landing-page.html
(in the parent theme) with the template landing-page.html
(in the new theme).