2021年1月21日星期四

The behavior of the knitr button in RStudio when rendering an Rmd file sitting inside a blogdown static folder

I have an Rmd file that I want to convert to a pdf file. Currently it is located in a subfolder of the "static" folder that is a part of my blog site structure created by the blogdown package. The problem is, when I hit the "Knit" button in RStudio, it calls rmarkdown::render_site(...) while I was expecting rmarkdown::render(...). I do have a file R/build.R with a single line of a command blogdown::build_dir("static") so this is weird to me. When I tried to convert other Rmd files in a different folder (not associated with my blog folders/files) everything works perfectly fine as expected.

To get what I want, I am currently typing rmarkdown::render("myfile.Rmd") in the console, or I am using infinite moon reader, but neither is as convenient as the "Knit" button :(

https://stackoverflow.com/questions/65820777/the-behavior-of-the-knitr-button-in-rstudio-when-rendering-an-rmd-file-sitting-i January 21, 2021 at 11:31AM

没有评论:

发表评论