构建网页时出错:RStudio + blogdown + Ezhil Theme

Error building webpage: RStudio + blogdown + Ezhil Theme

我是 blogdown/hugo 主题的新手,想使用 Ezhil theme with RStudio. I am following the instructions of blogdown.

构建网页

特别是在 creating the project on RStudio 之后,我无法 build/serve 该站点。如果我运行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 文件有 yamlyml 扩展名,您需要将 TOML 代码转换为 YAML

因此,将 ignoreErrors: "error-missing-instagram-accesstoken" 行添加到 config.yaml 文件中,而不是 ignoreErrors = ["error-missing-instagram-accesstoken"]。应该可以。