In v 0.123.2 i get this error that i didn’t had in previous version i used where all is working fine(at least v0.110.0 who is the production version for this code and i think v0.116.1 locally also)
error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
Error comes from line 28 in the code (.resources.Concat).
I put the full error message at the end.
{{ $styles := slice }}
{{ range site.Params.plugins.css }}
{{ $styles = $styles | append (resources.Get .link) }}
{{ end }}
{{ $styles := $styles | append (resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "style.scss" . | toCSS) }}
line 28 ==> {{ $styles = $styles | resources.Concat "/css/style.css" }}
$ hugo --gc --cleanDestinationDir --printI18nWarnings --logLevel info && htmltest -l 3
Start building sites …
hugo v0.123.2-929b91fe75cb0d041f22b4707700dfc117115ad4+extended darwin/amd64 BuildDate=2024-02-22T15:27:15Z VendorInfo=brew
INFO static: removing all files from destination that don't exist in static dirs
INFO static: syncing static files to / duration 136.244416ms
INFO build: step process substep collect files 692 files_total 692 duration 814.792375ms
INFO build: step process duration 815.360125ms
INFO build: step assemble duration 15.904875ms
ERROR render of "page" failed: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/_default/baseof.html:11:7": execute of template failed: template: author/single.html:11:7: executing "author/single.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/partials/essentials/style.html:28:32": execute of template failed: template: partials/essentials/style.html:28:32: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "page" failed: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/_default/baseof.html:11:7": execute of template failed: template: _default/our-rooms.html:11:7: executing "_default/our-rooms.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/partials/essentials/style.html:28:32": execute of template failed: template: partials/essentials/style.html:28:32: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "term" failed: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/_default/baseof.html:11:7": execute of template failed: template: _default/list.html:11:7: executing "_default/list.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/partials/essentials/style.html:28:32": execute of template failed: template: partials/essentials/style.html:28:32: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
ERROR render of "home" failed: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/_default/baseof.html:11:7": execute of template failed: template: index.html:11:7: executing "index.html" at <partialCached "essentials/style.html" .>: error calling partialCached: "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/layouts/partials/essentials/style.html:28:32": execute of template failed: template: partials/essentials/style.html:28:32: executing "partials/essentials/style.html" at <resources.Concat>: error calling Concat: resources in Concat must be of the same Media Type, got "text/x-scss" and "text/css"
INFO build: step render pages 94 content 14 duration 308.683708ms
INFO build: step postProcess duration 2.848167ms
ERROR TOCSS: failed to transform "style.scss" (text/x-scss): "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/assets/scss/templates/_bootstrap.scss:3:1": File to import not found or unreadable: ../bootstrap/mixins/banner.
INFO build: duration 1.144290791s
Total in 1552 ms
Error: error building site: TOCSS: failed to transform "style.scss" (text/x-scss): "/Users/xxx/Documents/Git/ghk-2022/themes/grandhotel/assets/scss/templates/_bootstrap.scss:3:1": File to import not found or unreadable: ../bootstrap/mixins/banner.