Preview the documentation site

Source: R/build.R

Regenerates the Quarto sources, then serves the site with ⁠quarto preview⁠.

Usage

preview_site(pkg = ".", browse = TRUE)

Arguments

pkg

Path to the package root directory

browse

Open the preview in a browser (default TRUE)

Value

Invisibly returns the path to the index file

Details

The sources are always regenerated first, so a devtools::document() run before previewing is picked up. While the preview is running, the pre-render hook in ⁠_quarto.yml⁠ regenerates them again on each rebuild – see regenerate().

The preview server runs in the background and can be stopped with stop_preview().