Use the servr package to continuously serve and reload
the Rmd document. Run preview_start() function while viewing the Rmd
panel of your presentation. To stop the server, run preview_stop().
Arguments
- file_path
The input Rmd file path (if missing and in RStudio, the current active document is used).
- ...
Additional arguments passed to
rmarkdown::render().- which
An integer vector of the server IDs; by default, IDs of all existing servers in the current R session obtained from
daemon_list(), i.e., all daemon servers will be stopped by default.
Value
Starts serving the current files to RStudio's Viewer pane.
Stops serving the current files to RStudio's Viewer pane.
Details
These functions need the {xaringan} and {servr} packages.
preview_start() is superseded, with the {xaringan} presentation
template. For the Quarto slides of use_quarto(), use the Render button,
or quarto preview in a terminal, which also reloads the slides.