Should I copy everything from /themes?

Hi! When customizing a theme, should I copy the whole folder (even the unchanged files), or just what I needed? Examples /themes/[theme-name]/layouts/ to /layouts vs be more specific /themes/[theme-name]/layouts/partials/header.html to /layouts/partials/header.html since I keep footer.html etc as is?

I am not aware of the technical reasoning, but I can think of

  • pro: if I want to edit other config in the future, I don’t need to copy and paste again
  • con: takes more space since I will have so many dupes (I upload the local directory to github and host it on Cloudflare Pages, if it matters)

I am still new to programming, git, HTML, CSS etc so please be patient. :folded_hands:

Copy only the files you want to make changes to.

Next time you update the theme you know what files you have overridden, the ones you have copied, and can concentrate on checking only them.

1 Like

You may have some other (better) options:

  • see the theme docs if there is a built-in way to achieve your requirements
  • ask the theme author for a hint or proposing a change

Both have the advantage that your site is easier to upgrade to a future version of the theme.

1 Like

Thank you, I would’ve never thought about this. This kind of insight is what I am looking for.

I did read its doc, and yeah they recommended overriding to root’s folder. It’s personal changes and not worth wasting the author’s time :sweat_smile: , like theme’s color, 404 text, etc, and with slowly reading the code I found where they’re located at anyway. Just want to make sure how to approach this customization better to not be a hassle for future-me.

Thank you, all. :smiling_face_with_three_hearts:

2 Likes