Thanks for the quick response and your explanations!
I realized that my initial assumption about assets/
just being overlaid in reverse was incorrect. I don’t know what qualifies as a “too complex setup”… but the Hyas framework might be a candidate.
What I’m trying to do is overwrite some Bootstrap SCSS files from the Doks theme (based on Hyas; initalized using a recent version of the create-hyas CLI).
There are three relevant assets
mounts involved:
[[mounts]]
source = "node_modules/@hyas/core/assets"
target = "assets"
[[mounts]]
source = "node_modules/@hyas/doks-core/assets"
target = "assets"
[[mounts]]
source = "assets"
target = "assets"
In this order I would expect that I can overwrite any of doks-core’s asset files (living under node_modules/@hyas/doks-core/assets/
) by placing a customized version in my project’s assets/
folder.
What I experience instead, is that my custom assets/scss/app.scss
is respected, but not the SCSS files that are @import
ed by this file (compiled via this Hugo template) like assets/scss/layouts/_pages.scss
(the corresponding file from doks-core is used instead).
My custom assets/scss/layouts/_pages.scss
is properly respected if I change the mounts
rule from above to:
[[mounts]]
source = "node_modules/@hyas/doks-core/assets"
target = "assets"
excludeFiles = "scss/layouts/_pages.scss"
(The same applies to other @import
ed SCSS files.)
When I change the mount order to the following OTOH, my custom assets/scss/app.scss
is not respected anymore (i.e. the corresponding file from doks-core is used instead), but the assets/scss/layouts/_pages.scss
file and other @import
ed ones are:
[[mounts]]
source = "assets"
target = "assets"
[[mounts]]
source = "node_modules/@hyas/core/assets"
target = "assets"
[[mounts]]
source = "node_modules/@hyas/doks-core/assets"
target = "assets"