R Blogdown中使用serve_site的generator $ render错误

时间:2019-02-17 20:14:55

标签: r blogdown

当我打开我的R Studio Blogdown项目并serve_site()时,它会在查看器中预览,并且看起来不错,只是内容没有像.Rmd文件中那样被更新。似乎预览站点卡在了旧的.html文件上。

在执行serve_site()后在R Studio中保存编辑后的Blogdown帖子时,我希望实时预览会更新。

但是,现在,如果我对帖子进行少量编辑并单击“保存”,则预览将失败,并且出现以下我无法理解或修复的错误:

Error in generator$render(input_file = input_file, output_format = output_format,  : 
  You probably should not knit the document in a blogdown project. Just call blogdown::serve_site() once per R session. See https://bookdown.org/yihui/blogdown/workflow.html. If you are sure you want to knit it and know what it means, set options(blogdown.allow_knit = TRUE).
Calls: <Anonymous> -> <Anonymous>
Execution halted
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] shiny_1.2.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        compiler_3.4.3    later_0.8.0       prettyunits_1.0.2 remotes_2.0.2    
 [6] tools_3.4.3       testthat_2.0.1    digest_0.6.18     pkgbuild_1.0.2    pkgload_1.0.2    
[11] jsonlite_1.6      evaluate_0.13     memoise_1.1.0     rlang_0.3.1       rstudioapi_0.9.0 
[16] cli_1.0.1         curl_3.3          yaml_2.2.0        blogdown_0.10.5   xfun_0.4         
[21] stringr_1.4.0     withr_2.1.2       knitr_1.21        desc_1.2.0        fs_1.2.6         
[26] devtools_2.0.1    rprojroot_1.3-2   glue_1.3.0        R6_2.4.0          processx_3.2.1   
[31] rmarkdown_1.11    bookdown_0.9      sessioninfo_1.1.1 servr_0.12        callr_3.1.1      
[36] magrittr_1.5      backports_1.1.2   ps_1.3.0          promises_1.0.1    htmltools_0.3.6  
[41] usethis_1.4.0     rsconnect_0.8.13  assertthat_0.2.0  xtable_1.8-3      mime_0.6         
[46] httpuv_1.4.5.1    stringi_1.3.1     miniUI_0.1.1.1    crayon_1.3.4     

0 个答案:

没有答案