I’m trying to go for a modular website. This is the project structure:
site (module)
- theme (module)
- bootstrap (module)
- svg icon system (module)
Now, my svg-icon-system
module depends on FontAwesome version 5.15.4 as is shown in the module’s go.mod
.
When I do hugo mod graph
in my theme folder, I get:
❯ hugo mod graph
github.com/UtkarshVerma/hugo-yoru github.com/UtkarshVerma/hugo-modules/bootstrap-v5@v0.0.0-20211227063022-65ec41aa3f2c
github.com/UtkarshVerma/hugo-modules/bootstrap-v5@v0.0.0-20211227063022-65ec41aa3f2c github.com/twbs/bootstrap@v5.1.3+incompatible
github.com/UtkarshVerma/hugo-modules/bootstrap-v5@v0.0.0-20211227063022-65ec41aa3f2c github.com/popperjs/popper-core@v2.10.2+incompatible+vendor
github.com/UtkarshVerma/hugo-yoru github.com/UtkarshVerma/hugo-modules/svg-icon-system@v0.0.0-20211227063022-65ec41aa3f2c
github.com/UtkarshVerma/hugo-modules/svg-icon-system@v0.0.0-20211227063022-65ec41aa3f2c github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac
which is as expected.
However, when I do hugo mod graph
in my website folder, I get:
go get: added github.com/UtkarshVerma/hugo-yoru v0.0.0-00010101000000-000000000000
hugo: downloading modules …
go get: added github.com/twbs/bootstrap v5.1.3+incompatible
go get: added github.com/FortAwesome/Font-Awesome v4.7.0+incompatible
hugo: collected modules in 6262 ms
I find this really weird. I don’t know how it is resolving the v4.7.0 even when the svg-icon-system
module clearly depends on another version.
My website and theme are quite bare-bones, with the following configs:
#site/config.yaml
module:
imports:
- path: github.com/UtkarshVerma/hugo-yoru
// site/go.mod
module bitbanged.com
go 1.17
replace github.com/UtkarshVerma/hugo-yoru => ../hugo-yoru
require (
github.com/FortAwesome/Font-Awesome v4.7.0+incompatible // indirect
github.com/UtkarshVerma/hugo-yoru v0.0.0-00010101000000-000000000000 // indirect
github.com/twbs/bootstrap v5.1.3+incompatible // indirect
)
#theme/config.yaml
module:
imports:
- path: github.com/UtkarshVerma/hugo-modules/bootstrap-v5
- path: github.com/UtkarshVerma/hugo-modules/svg-icon-system