My idea is to split the root directory of a Hugo site into “specific” and “generic” directories, then most of the existing directories can be duplicated in both of these … and then the generic folder subtree can be treated more easily as a git submodule in a dozen different Hugo sites that all reuse, e.g., that same config settting (e.g, default editor), that same custom shortcode, that same post archetype, that same static file, that same scss asset that overrides the third-party theme, etc … while that partial that has to be specific to each site† still goes into the specific/layouts folder (and thus is unique to the parent git repository)
Maybe Hugo modules address this reusability idea, I don’t know, I stopped using modules because for me it’s just easier to use a git submodule, and then when a third-party theme is present as a directory in my site, it’s faster for me to experiment with copying bits of their layouts and such up into my own personal layouts override directory … and then it also doesn’t matter whether or not the default GitLab hugo image supports modules or not either.
† I have a bit that is unique to each site because the internal Google Analytics template does not put Google Analytics at the very top of the page like I want it, so I can’t use the config option for Google Analytics