Skip to main content

Preview the built site

Source: R/project.R

Description

Serves docs/ (or docs/dev/, for a development site; see the Configuration section of build_site()), as built by build_site(), in a web browser, and reloads the page when the site is rebuilt. The server keeps running for the rest of the R session and is reused by later calls, including build_site()’s (which, with a server already running, leaves the open page to reload instead of opening another).

Usage

preview_site(path = ".")

Arguments

path Path to the package root.

Value

The server, invisibly; see servr::httw().

Examples