I hope I’m asking this question correctly and clearly.
I created a Hugo site and used a theme I installed as a git submodule. I’m using GitHub Pages for hosting my site. I edited the theme and am now wondering how I should manage those changes.
My first thought was to fork the theme’s repo and use that as my theme’s remote origin. I would be able to commit my theme changes however I’d like. Is there a reason why this isn’t a good idea?
Are there any other good ways to do this or best practices in this regard?
Thanks in advance.
I think you’re on the right track (with forking), but the simplest way is to just override the theme in your root directory: https://gohugo.io/themes/customizing/#override-template-files
I suppose it depends on the degree of changes you want to make.
Ah-ha! You have enlightened me!!! Thank you very much, @budparr!
@budparr is right about the override thing, but I would (normally) only fork if I have to. Just adding the original theme as a submodule below /themes has its benefits – you can just pull in updates/fixes etc. as you please without thinking about Git merging.
As well as better CI/CD friendliness compared to