Hugo is not recognizing assets directory

I am working on a moderately big multilingual Hugo site (has few thousand posts).
When I run:

hugo server --navigateToChanged --gc --printMemoryUsage

I get the following output (last few lines):

Alloc = 1.1 GB
TotalAlloc = 3.6 GB
Sys = 1.3 GB
NumGC = 29

Built in 16748 ms
Watching for changes in D:\bla\{content,data,layouts,static}
Watching for config changes in D:\bla\config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Why isn’t Hugo watching for changes in assets directory?
The assets directory is verily present along side content, data, static & layout directories.
I don’t have this issue with other sites.

Here is the config.toml of this site:

config.toml
baseurl = "/"
title = "asui"
languageCode = "en-US"
defaultContentLanguage = 'en'
paginate = 12

# Top menu bar

[languages]

[languages.en]
  contentDir = "content/en"
  languageName = "English"
  weight = 1
[languages.en.params]
  languageShorthand = "EN"
  languageIso6391 = "en"

[languages.fr]
  contentDir = "content/fr"
  languageName = "Français"
  weight = 2
[languages.fr.params]
  languageShorthand = "FR"
  languageIso6391 = "fr"

[languages.de]
  contentDir = "content/de"
  languageName = "Deutsch"
  weight = 3
[languages.de.params]
  languageShorthand = "DE"
  languageIso6391 = "de"

[languages.it]
  contentDir = "content/it"
  languageName = "Italiano"
  weight = 5
[languages.it.params]
  languageShorthand = "IT"
  languageIso6391 = "it"

[build]
  minify = true

[Permalinks]
  blog = "/:slug"
  about-us="/:slug"

[[module.mounts]]
  source = "static/images"
  target = "assets/images"

[params]
  highlightjs = true

As a result of this issue, all the resources.Get calls are failing with error: type <nil> not supported in Resource transformations.

Any help/hint is appreciated.

Since Hugo usually handles assets just fine, something in your setup is probably wrong. Hard to say what exactly given the little information you provide.

Also, your baseURL makes no sense.

Since you are changing assets and static mounts you must declare that you still want the default fonts as well.

[[module.mounts]]
    source = 'assets'
    target = 'assets'
[[module.mounts]]
    source = 'static'
    target = 'static'
1 Like

@chrillek, thanks for your reply.

Yes, I’m aware of this. It should be the actual URL.

@frjo you are right. Thanks a ton for the solution.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.