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
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:

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

# Top menu bar


  contentDir = "content/en"
  languageName = "English"
  weight = 1
  languageShorthand = "EN"
  languageIso6391 = "en"

  contentDir = "content/fr"
  languageName = "Français"
  weight = 2
  languageShorthand = "FR"
  languageIso6391 = "fr"

  contentDir = "content/de"
  languageName = "Deutsch"
  weight = 3
  languageShorthand = "DE"
  languageIso6391 = "de"

  contentDir = "content/it"
  languageName = "Italiano"
  weight = 5
  languageShorthand = "IT"
  languageIso6391 = "it"

  minify = true

  blog = "/:slug"

  source = "static/images"
  target = "assets/images"

  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.

    source = 'assets'
    target = 'assets'
    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.