How to knit single files in a bookdown project without serving the whole book. Is there an equivalent to `options(blogdown.knit.serve_site=FALSE)`?

Viewed 121

For reasons similar to those in blogdown issue 572, I would like the Rstudio knit button to behave as it does when I am not in a bookdown project folder, rendering a file that happens to be in a bookdown project folder according to the file's YAML, not the bookdown output YAML. I think this means that I would like the knit button to call rmarkdown::render rather than rmarkdown::render_site.

As noted by Yihui in blogdown issue 572, there is now such an option to change the default behavior of the knit button in a blogdown project: options(blogdown.knit.serve_site = FALSE).

The bookdown docs show how to customize the knit button:

knit: (function(input, ...) {rmarkdown::render(input)})

This works, but I'd rather change the global options for the Knit button, if possible (because we have a "Build Book" button in the Build pane. Thanks!

0 Answers
Related