I have followed the instructions here: https://bookdown.org/yihui/bookdown/serve-the-book.html
Using the default bookdown project that Rstudio IDE creates I run:
serve_book(dir = ".", output_dir = "_book", preview = TRUE,
in_session = TRUE, quiet = FALSE)
All goes well: the HTML output shows in the RStudio Viewer.
Then, I modify a color from black to blue in the style.css file and save the file. My understanding from reading https://bookdown.org/yihui/bookdown/serve-the-book.html is that this change should immediately be reflected in the viewer:
The server will listen to changes in the book root directory: whenever you modify any files in the book directory,
serve_book()
can detect the changes, recompile the Rmd files, and refresh the web browser automatically. If the modified files do not include Rmd files, it just refreshes the browser (e.g., if you only updated a certain CSS file). This means once the server is launched, all you have to do next is simply write the book and save the files. Compilation and preview will take place automatically as you save files.
However this is not what happens when I save the change, instead the following text appears in the Rstudio console:
Output created: _book/index.html
To stop the server, run servr::daemon_stop(2) or restart your R session
Serving the directory /Users/[OMITTED FOR PRIVACY]Bookdown-Material/bookdown-mve at http://127.0.0.1:4321
Error in if (config$output_dir != ".") exclude <- c(exclude, config$output_dir) :
argument is of length zero
Error in if (config$output_dir != ".") exclude <- c(exclude, config$output_dir) :
argument is of length zero
Error in if (config$output_dir != ".") exclude <- c(exclude, config$output_dir) :
argument is of length zero
And nothing happens to the HTML in the preview, i.e. the change is not reflected in there.
What am I doing wrong or missing?