Module import: no mounted folder, no errors

I feel like I’m missing something obvious here if someone can help.

I’m trying to use a module and mount assets the way it’s supposed to, in my case GitHub - gohugoio/hugo-mod-bootstrap-scss: Packages Bootstrap SCSS (v4 and v5) as a Hugo Module - which should just download bootstrap sources and mount result on assets/scss

I haven’t been able to do so :smiley:

$ hugo version
hugo v0.113.0+extended linux/amd64 BuildDate=2023-07-06T15:15:58Z VendorInfo=debian:0.113.0-2
$ cat hugo.toml 

path = ""

My assets folder remains as it was before using the module.

$ hugo
Start building sites … 
hugo v0.113.0+extended linux/amd64 BuildDate=2023-07-06T15:15:58Z VendorInfo=debian:0.113.0-2

                   | EN  
  Pages            |  2  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 47  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 52 ms

$ ll assets/ assets/scss/
total 0
drwxr-xr-x 1 rkj rkj 16 Aug  2 10:58 js
drwxr-xr-x 1 rkj rkj 20 Aug  9 11:12 scss

total 4.0K
-rw-r--r-- 1 rkj rkj 3.9K Aug  9 11:12 my_style.scss

Thank you for your help :smiley:

Quick bump, not making any progress here, I’ve tried a handful of versions of hugo, and also directly with the module which should also mount its own deps into assets. I don’t manage to see the mounted folders, it seems it has no effect. Clearly there’s something wrong the way I’m doing this.

Starting with a clean/virgin site…

hugo mod init foo


path = ""

assets/scss/main.scss (NOT IN STATIC)

@import "bootstrap/bootstrap


  {{ with resources.Get "scss/main.scss" | toCSS }}
    <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
  {{ end }}
1 Like

ok well it does work, thank you sorry for trouble <3

One misunderstanding about the way it works, I was thinking somehow assets would be populated somewhere in the project path ala node_modules, but actually go modules for hugo dependencies are stored in hugo temp folder (defaults to /tmp/hugo_cache)

This is not super convenient for IDE but I’ll make a symlink or something.

The other mistake I made was a typo on my scss import: import "bootstrap/boo_R_strap"… so that’s why my file was not compiling :man_facepalming: - getting lost without IDE completion, fatfinger

Thank you :smiley:

We recently changed the user cache location. See

You can vendor the module(s) with hugo mod vendor. Then see _vendor directory in root of project.

thanks very good :+1:

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