我是blogdown/ugo主题的新手,想用RStudio构建一个使用Ezhil主题的网页。我遵循blogdown的指示。
特别是,在RStudio上创建项目后,我无法构建/服务该网站。如果我运行serve_site()
,我将获得
> blogdown::serve_site()
Launching the server via the command:
/Users/brunoconteleite/Library/Application Support/Hugo/0.84.2/hugo server --bind 127.0.0.1 -p 4321 --themesDir themes -t ezhil -D -F --navigateToChanged
Error: Error building site: logged 1 error(s)
相反,如果我运行hugo_build()
,我会获得
> blogdown::hugo_build()
Start building sites …
hugo v0.84.2-E0C67958+extended darwin/amd64 BuildDate=2021-06-28T10:59:21Z VendorInfo=gohugoio
ERROR 2021/06/29 13:20:37 instagram shortcode: Missing config value for services.instagram.accessToken. This can be set in config.toml, but it is recommended to configure this via the HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN OS environment variable. If you are using a Client Access Token, remember that you must combine it with your App ID using a pipe symbol (<APPID>|<CLIENTTOKEN>) otherwise the request will fail.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-missing-instagram-accesstoken"]
Total in 40 ms
Error: Error building site: logged 1 error(s)
我尝试将建议的ignoreErrors = ["error-missing-instagram-accesstoken"]
代码行添加到config.yalm
文件中,但无法解决此问题。
如果config
文件的扩展名为yaml
或yml
,则需要将TOML
代码转换为YAML
。
因此,在config.yaml
文件中添加ignoreErrors: "error-missing-instagram-accesstoken"
行,而不是ignoreErrors = ["error-missing-instagram-accesstoken"]
行。它应该起作用。