It does not depend on the way you import the code.
Best practice is, to copy the files you want to modify to the same location in your site.
Modify it there, enhance, change , add whatever. Don’t change the files in a theme directly.
You should go with this also when using submodules or clone.
Hugo will use your local copy first and skip the theme one.
you could - if you dig in - for example change the code that’s adding the css. implementing a similar approach than poison (or other).
To get the sources of a module, just vendor the module - implement using the approach from above. Then you have access to the files in the vendor folder. (
- copy the ones you need to your site and adjust.
- if you don’t want the vendored stuff in your repo, add them to your to .gitignore
more details here: hugo mod vendor and Use Hugo Modules
other ways:
- clone it somewhere as a source
- find it in the hugo cache