Search code examples
rhugoblogdown

Error building webpage: RStudio + blogdown + Ezhil Theme


I am new to blogdown/hugo themes and want to build a webpage using the Ezhil theme with RStudio. I am following the instructions of blogdown.

In particular, after creating the project on RStudio, I am not able to build/serve the site. If I run serve_site(), I obtain

> 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)

Instead, if I run hugo_build(), I obtain

> 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)

I tried to add the suggested ignoreErrors = ["error-missing-instagram-accesstoken"] line of code to the config.yalm file but could not address this issue.


Solution

  • You need to turn the TOML code into YAML if your config file has yaml or yml extension.

    So, rather than ignoreErrors = ["error-missing-instagram-accesstoken"], add ignoreErrors: "error-missing-instagram-accesstoken" line to your config.yaml file. It should work.