Hi - I am trying to set up my first hugo site through and am following a guide. One of the initial steps is to run the following code:
new_site(theme = “wowchemy/starter-academic”)
…
Which then asks me to preview the site. Once I center submit, I get the following error
Want to serve and preview the site now? (y/n) y
Launching the server via the command:
C:/Users/dvo/AppData/Roaming/Hugo/0.91.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t starter-hugo-academic -D -F --navigateToChanged
Error: Error building site: failed to render pages: render of “page” failed: execute of template failed: template: book/single.html:5:3: executing “book/single.html” at <partial “site_head” .>: error calling partial: “D:\Documents\R\Website\dvo\themes\github.com\wowchemy\wowchemy-hugo-modules\wowchemy\v5\layouts\partials\site_head.html:208:13”: execute of template failed: template: partials/site_head.html:208:13: executing “partials/site_head.html” at <getenv “WC_POST_CSS”>: error calling getenv: access denied: “WC_POST_CSS” is not whitelisted in policy “security.funcs.getenv”; the current security configuration is:
I’m having the same issue when I run sudo hugo on macOS 12.0.1. My first error is:
ERROR 2021/12/20 17:08:06 render of “page” failed: execute of template failed: template: _default/single.html:5:3: executing “_default/single.html” at <partial “site_head” .>: error calling partial: “/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5@v5.0.0-20211122231030-d26f01d5d6c3/layouts/partials/site_head.html:208:13”: execute of template failed: template: partials/site_head.html:208:13: executing “partials/site_head.html” at <getenv “WC_POST_CSS”>: error calling getenv: access denied: “WC_POST_CSS” is not whitelisted in policy “security.funcs.getenv”; the current security configuration is:
This won’t help your issue, but you shouldn’t by running hugo as Super User. If you hugo doesn’t work without sudo then something’s gone wrong with the way you’ve installed it.