🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
The bug happens when trying to compile the website with Hugo locally.
After installing Hugo using the instructions on the wowchemy documentation and downloading a template from its repository in .zip format, the following error happens when using the command hugo or hugo server:
ERROR 2022/01/21 11:45:08 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: "C:\Users\clemh\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:177:13": execute of template failed: template: partials/site_head.html:177: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:
[security]
enableInlineShortcodes = false
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
[security.funcs]
getenv = ['^HUGO_']
[security.http]
methods = ['(?i)GET|POST']
urls = ['.*']
ERROR 2022/01/21 11:45:08 render of "section" failed: execute of template failed: template: book/list.html:5:3: executing "book/list.html" at <partial "site_head" .>: error calling partial: "C:\Users\clemh\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:177:13": execute of template failed: template: partials/site_head.html:177: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:
[security]
enableInlineShortcodes = false
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
[security.funcs]
getenv = ['^HUGO_']
[security.http]
methods = ['(?i)GET|POST']
urls = ['.*']
ERROR 2022/01/21 11:45:08 render of "home" failed: execute of template failed: template: index.html:5:3: executing "index.html" at <partial "site_head" .>: error calling partial: "C:\Users\clemh\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:177:13": execute of template failed: template: partials/site_head.html:177: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:
[security]
enableInlineShortcodes = false
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
[security.funcs]
getenv = ['^HUGO_']
[security.http]
methods = ['(?i)GET|POST']
urls = ['.*']
ERROR 2022/01/21 11:45:08 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: "C:\Users\clemh\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:177:13": execute of template failed: template: partials/site_head.html:177: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:
[security]
enableInlineShortcodes = false
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
[security.funcs]
[security.http]
methods = ['(?i)GET|POST']
urls = ['.*']
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: "C:\Users\clemh\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:177:13": execute of template failed: template: partials/site_head.html:177: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:
[security]
enableInlineShortcodes = false
[security.exec]
allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
[security.funcs]
getenv = ['^HUGO_']
[security.http]
urls = ['.*']
Describe the bug
The bug happens when trying to compile the website with Hugo locally.
After installing Hugo using the instructions on the wowchemy documentation and downloading a template from its repository in
.zip
format, the following error happens when using the commandhugo
orhugo server
:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The site should compile out of the box.
Technical details:
go.mod
): v0.0.0-20210526223849-81ba17522966hugo version
): hugo v0.91.2-1798BD3F+extended windows/amd64 BuildDate=2021-12-23T15:33:34Z VendorInfo=gohugoioExisting workaround
The problem can be solved by adding the following lines in
config.yaml
, as according to these instructions: