HUGO

Fields in .Params missing after adding modules configuration

I want to add foundation-sites scss to my project via module.mounts. I added this particular mount and default module.mounts configuration like mentioned here.

My config.toml:

[module]
  [[module.mounts]]
    source = "content"
    target = "content"
  [[module.mounts]]
    source = "static"
    target = "static"
  [[module.mounts]]
    source = "layouts"
    target = "layouts"
  [[module.mounts]]
    source = "data"
    target = "data"
  [[module.mounts]]
    source = "assets"
    target = "assets"
  [[module.mounts]]
    source = "i18n"
    target = "i18n"
  [[module.mounts]]
    source = "archetypes"
    target = "archetypes"
  [[module.mounts]]
    source = "./node_modules/foundation-sites/scss/"
    target = "assets/styles/foundation"

With this configuration, {{ .Params }} will output only map[draft:false iscjklanguage:false], but without it I get map[bodyclass:izi-app draft:false headersimple:true iscjklanguage:false title:Home]

Hugo version: Hugo Static Site Generator v0.77.0/extended darwin/amd64

What am I doing wrong?

Hi,

The documentation is wrong.

You may find a better example here:

Hi there,

Please have a read about Requesting Help and include a link to your site code repo.

I have a similar setup here: [repo / demo] which works well enough.

Thank you both. I tried your solutions, and it has failed me. module.imports does not work, because the repo that I want to include is not a Hugo module. Importing it with module.mounts produces the bug that I explained above. Unfortunately, I can’t share my repo, because it’s private. For now, I will include the dependency with good old copy-paste.