Zola version: v0.12.0
OS: Linux (Ubuntu 20.04.1 LTS, Linux 5.6.16)
I want to serve a local instance with this command:
zola serve
When invoking the command, a sass error comes up:
zola serve
Error: Can't watch `sass` for changes in folder `/home/timvisee/git/timvisee.com`. Do you have correct permissions?
Reason: entity not found
You may reproduce this by trying the serve command on this version of my personal website.
git clone https://gitlab.com/timvisee/timvisee.com.git
cd timvisee.com
git checkout 328ff3e819b45eb568f4cfb6860900c543b3636d
zola serve
v0.12.0, v0.11.0 is fine.sass directory is at ./themes/zenn/sass.The same happens on the latest next branch (70c23bd84bf11e09c2a19a6891bedf8366b481ea).
Looks like it errors when the sass folder is not present now, should be an easy fix
You're right. Creating /sass makes it succeed.
May I give patching this a try, or are you already on it?
Go for it, the bug is in https://github.com/getzola/zola/blob/master/src/cmd/serve.rs
I did some investigation.
It seems it now requires a /sass directory when compile_sass = true in the site configuration (because of this line, since b003a47d549c92a7210965df8095e1a6dc4b32db).
Now, removing this configuration property from my configuration (having the error) also removes the error. Styles still seem to be rendered correctly, even though I'm using sass styles in the theme (./theme/zenn/sass).
This makes me wonder:
compile_sass option just to compile sass styles in /sass?compile_sass option?compile_sass is unset?The config.toml documentation shows this for compile_sass:
When set to "true", the Sass files in the
sassdirectory are compiled.
I'm assuming this is just for sass styles in /sass.
Because, if this option is just to compile sass included in the root directory, then I'd consider this error desired behavior. Yes, the shown error could be better though.
That's a good point, I forgot the themes.
I think it makes sense for compile_sass to be implicit for themes and have compile_sass in your own config.toml be only for the root site.
+1 on not even trying to watch the folder and update the docs
I'll leave it as is, and will update the documentation then.