The problem is that I usually use toCSS pipe in combination with postCSS. I couldnt find another way to preprocess scss, inline css and pipe with postcss using hugo without gulp, could you advice any?
I’ve tried to do so but instead received this error Error: Error building site: "/hugo/content/page/index.md:12:1": failed to render shortcode "p/p-11": failed to process shortcode: "/hugo/layouts/shortcodes/s/sb-10/sb-10.html:6:22": execute of template failed: template: shortcodes/s/sb-10/sb-10.html:6:22: executing "shortcodes/s/sb-10/sb-10.html" at <toCSS>: error calling toCSS: type string not supported in Resource transformations
It could be, but the point is the error started to occur with project growing, with 400 pages I had no problem with sass files now I’m getting an error on the finish line )))
@bschoen, I’ve tried to use code above and it worked but the error remained
Hmm, I see. I think your original code was doing exactly the same… so I guess it has nothing to do with the way you load your sass files. (But they really should be in your assets directory like @regis mentioned. I guess they already are, because resources.get retrieves the file relative to the asset directory).
I can’t make anything from the original error output, I’m afraid.
Resources needs to live in /assets directory. The error you get suggests a bug in the error handling, but you should correct your SCSS handling as a first step.
I moved all files to /static/assets and this not really resolved the issue. I’ve tried to move files to assets folder(without static folder in the path ) - it didn’t work. Yesterday I noticed that rebuild of files break not only on scss file change but also on html modification. I found out that hugo tries to change .idea file, so as I work in webstorm .idea folder is always created.
I tried to work with sublime text and it worked for a while, but broke in the end. My thought was to include .idea folder with ignorefiles = [ "/.idea" ] in config.toml but it didn’t work out. I tried different regex but it looks like property "ignorefiles " doesn’t really works as expected
Now as I moved all styles to /static/ and moved all project to “project” directory on scss file change I see some unexpected for me behavior. When I change scss file I see next console output: