我不确定如何解决在Blogdown项目上创建新帖子时遇到的错误,
https://github.com/ssp3nc3r/ssp3nc3r.github.io
使用新的帖子加载项,无论我将类型设置为md
还是rmd
,都会发生这种情况:
> blogdown:::new_post_addin()
Loading required package: shiny
Listening on http://127.0.0.1:4427
post/2018-10-17-test2.md created
Warning in file(con, "r") :
cannot open file 'content/post/2018-10-17-test2.md': No such file or directory
Warning: Error in file: cannot open the connection
90: file
89: readLines
86: hugo_toYAML
85: new_content
84: blogdown::new_post
83: observeEventHandler
12: shiny::runApp
11: shiny::runGadget
10: eval
9: eval
4: eval
3: eval
2: sys.source
1: blogdown:::new_post_addin
但是文件2018-10-17-test2.md
实际上是在项目目录中创建的。似乎一个线索是目录的差异,
post/2018-10-17-test2.md created
与
cannot open file 'content/post/2018-10-17-test2.md'
我已经重新安装了blowdown和Hugo,
devtools::install_github("rstudio/blogdown")
blogdown::update_hugo()
但是错误仍然存在。
这是我的会话信息:
> devtools::session_info('blogdown')
Session info -----------------------------------------------------------------------------------------------
setting value
version R version 3.5.1 (2018-07-02)
system x86_64, darwin15.6.0
ui RStudio (1.2.1060)
language (EN)
collate en_US.UTF-8
tz America/New_York
date 2018-10-17
Packages ---------------------------------------------------------------------------------------------------
package * version date source
backports 1.1.2 2017-12-13 CRAN (R 3.5.0)
base64enc 0.1-3 2015-07-28 CRAN (R 3.5.0)
BH 1.66.0-1 2018-02-13 CRAN (R 3.5.0)
blogdown 0.8.6 2018-10-17 Github (rstudio/blogdown@44895dd)
bookdown 0.7 2018-02-18 CRAN (R 3.5.0)
digest 0.6.18 2018-10-10 CRAN (R 3.5.1)
evaluate 0.12 2018-10-09 CRAN (R 3.5.1)
glue 1.3.0 2018-07-17 CRAN (R 3.5.0)
graphics * 3.5.1 2018-07-05 local
grDevices * 3.5.1 2018-07-05 local
highr 0.7 2018-06-09 CRAN (R 3.5.0)
htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)
httpuv 1.4.5 2018-07-19 CRAN (R 3.5.0)
jsonlite 1.5 2017-06-01 CRAN (R 3.5.0)
knitr 1.20 2018-02-20 CRAN (R 3.5.0)
later 0.7.5 2018-09-18 CRAN (R 3.5.0)
magrittr 1.5 2014-11-22 CRAN (R 3.5.0)
markdown 0.8 2017-04-20 CRAN (R 3.5.0)
methods * 3.5.1 2018-07-05 local
mime 0.6 2018-10-05 CRAN (R 3.5.0)
promises 1.0.1 2018-04-13 CRAN (R 3.5.0)
R6 2.3.0 2018-10-04 CRAN (R 3.5.0)
Rcpp 0.12.19 2018-10-01 CRAN (R 3.5.1)
rlang 0.2.2 2018-08-16 CRAN (R 3.5.0)
rmarkdown 1.10 2018-06-11 CRAN (R 3.5.0)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.5.0)
servr 0.10 2018-05-30 CRAN (R 3.5.0)
stats * 3.5.1 2018-07-05 local
stringi 1.2.4 2018-07-20 CRAN (R 3.5.0)
stringr 1.3.1 2018-05-10 CRAN (R 3.5.0)
tinytex 0.8 2018-08-30 CRAN (R 3.5.0)
tools 3.5.1 2018-07-05 local
utils * 3.5.1 2018-07-05 local
xfun 0.3 2018-07-06 CRAN (R 3.5.0)
yaml 2.2.0 2018-07-25 CRAN (R 3.5.0)
>