I like a particular theme partial, but want to add to it.
The default index.html is good. It has a partial of head.html. I want to append to the theme’s head.html. I don’t want to have to override index.html.
Is there a way I can put my own partials/head.html in place and call themes/theme/layouts/partials/head.html from inside it?
I guess this idea is an outlier, so I’ll abandon it.
If the partial you like is located in themes/sometheme/layouts/partials/somefile.html
then create a file called layouts/partials/somefile.html
(in your root directory). Copy over the contents of the original file and edit to your use. That’s how this is supposed to be done
Slightly more “professional”:
- create a second theme
mytheme
- create the partial with identical path in your theme and change
- add in your config `themes: [“originaltheme”, “mytheme”].
Everything to the right overrides everything to the left. Everything not available on the right is used from the left. The “root”-layouts folder will override all themes.
2 Likes