HUGO

Best way to get updates and work with personalised layouts

I’ve been using the Notepadium theme but I’ve been making more and more personalized layouts because my website need slightly different features and slightly different presentations than what the theme offers. But, I would still like to get all the upstream updates, but it’s starting to become a bit difficult because every time a layout updates I have to go in there and manually copy paste the changes into my personalised layouts.

Is this how it’s supposed to work, or is there a better way?

I guess I’m asking what’s the best way to get all updates from a theme while also having many personalised layouts.

Instead of manually overriding the theme, you could do a git fork of it, then periodically pull in changes.

Put your own templates in the root layout folder, they will override the templates in the theme.

Example, you want to customise the default single.html template:

[your-site-dir]/themes/notepadium/layouts_default/single.html

Copy it to:

[your-site-dir]/layouts/_default/single.html

and edit it there. Hugo will now use your own version instead of the theme version.

Since your version is not in the theme folder it’s easy to update the theme.

This will work for any file in the theme.

I guess this would be the only solution… Kind of cumbersome. The theme owner is making it eas-ier by making lots of partials so that we can personalise more easily without having to fork. But yea - I probably have to fork the theme on GitHub, which is not ideal.