blogdown::new_site(): Error in dir.exists(x) : invalid filename argument

Viewed 60

I am for the first time trying to make a website with blogdown. On running

setwd("..to-my-empty-website-directory..")
library(blogdown)
new_site(theme="yihui/hugo-xmin", dir=".")

I get the error

> new_site(theme="yihui/hugo-xmin", dir=".")
― Creating your new site
| Installing the theme yihui/hugo-xmin from github.com
trying URL 'https://github.com/yihui/hugo-xmin/archive/HEAD.tar.gz'
downloaded 68 KB

Error in dir.exists(x) : invalid filename argument

What is wrong? I have latest versions of hugo v0.103.0 and RStudio 2022.07.1 Build 554. All R packages are up-to-date. Here is Session info

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] blogdown_1.12.1

loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1    yaml_2.3.5     knitr_1.40     xfun_0.33 
1 Answers

This is a bug in blogdown, and I have just fixed it in the dev version. Please try the dev version:

remotes::install_github('rstudio/blogdown')
Related