我已经按照here的说明安装了R blogdown软件包并运行了我的新站点。当我运行serve_site()时,我得到了下面的错误消息:
Launching the server via the command:
C:/Users/xxxxx/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: "C:\Users\em14031\OneDrive - AUT University\Personal_website\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:
[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 = ['.*']
看起来有一些安全配置文件需要编辑,但是我在项目的“~/config/_default”中找不到它。你知道这个文件可能在哪里吗?
多谢了!
1条答案
按热度按时间f45qwnt81#
在您的网站项目中,配置文件是
config/_default/config.yaml
。添加以将环境变量
WC_POST_CSS
列入白名单。