How to do hugo >= 0.77 module.replacements with nested modules right

nested modules are working fine on this tiny example site, but module.replacements does not:

This site is importing
The only page it offers is: /hugo-icons-listing from regisphiliberts module.

I then planed to adjust the layout:

  1. downloading the “hugo-module-icons” next to my “icons-test-site”
  2. in icons-test-site/config.toml I set replacements = ‘github com regisphilibert hugo-module-icons → …\hugo-module-icons’

This breaks hugo server -D and hugo with
Error: module " twbs icons" not found;

this is an import from regisphiliberts module.

Where does this error need to be fixed and how?

This may be related to:

I was able to make your setup work by using the replace directive with your project’s go.mod file, instead of using module.replacements within your project’s configuration file.


go 1.16

replace => ../hugo-module-icons

require ( v0.0.0-20200905140323-ee1ee22c0d75 // indirect v1.5.0 // indirect

Tank you, that works for me too.
I still hope this gets fixed soon. I see a huge advantage to handle this in config files if used in conjunction with environment specific configuration-directories.