rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.74k stars 331 forks source link

Error occured after run blogdown::serve_site() #714

Closed mrcongliu closed 2 years ago

mrcongliu commented 2 years ago

After run

new_site(theme="dillonzq/LoveIt")
blogdown::serve_site() 

in RStudio, it throws

Error in if (is.na(c3)) vars = c(vars, HUGO_IGNOREERRORS = "error-remote-getjson") : 
  the condition has length > 1

Also, I found the place that throws the error: https://github.com/rstudio/blogdown/blob/046be197424dab53c0343b811b45fd072fcd4bff/R/utils.R#L960

Probably due to their loveit/config.yaml

ignoreErrors:
  - error-remote-getjson
  - error-missing-instagram-accesstoken
yihui commented 2 years ago

Fixed now. Thanks a lot for the report!

mrcongliu commented 2 years ago

Thanks for fixing this.

It worked after forcing the re-install of blogdown

if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("rstudio/blogdown",
                        ref = "3122328fe7757ef960a59fe4e8f79aae67238735", force = TRUE)