首页 > 解决方案 > blogdown find_config() 在工作目录中找不到 config.yaml 文件

问题描述

我有一个用 Hugo 构建的宏伟博客网站,我在blogdown两天前最后一次成功地使用了该网站。昨天,当我再次尝试建立一个帖子(同时没有更改任何其他内容)时,我遇到了这个错误:

> blogdown::build_site()
Error in find_config() : 
  Cannot find the configuration file config.toml | config.yaml of the website

好吧,这是list.files()我的工作目录中的结果:

> cat(list.files())
assets config config.yaml content layouts netlify.toml resources static themes mydomain.com.Rproj

注意 的显着存在config.yaml

请注意,此问题并非孤立于blogdown::build_site()- blogdown 提供的任何 Rstudio 插件函数都会返回相同的问题。

这是我的SessionInfo()

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] blogdown_1.5

loaded via a namespace (and not attached):
 [1] compiler_4.0.3  bookdown_0.24   fastmap_1.1.0   htmltools_0.5.2 tools_4.0.3     yaml_2.2.1      rmarkdown_2.11  knitr_1.36     
 [9] xfun_0.26       digest_0.6.27   rlang_0.4.11    evaluate_0.14  

如果它值得,这里是我的博客源文件的链接。事实上,如果你下载 .zip 文件,解压缩它,然后打开 Rstudio 项目,你会blogdown在附加时得到同样的错误。

标签: ryamlrstudioblogdown

解决方案


推荐阅读