Skip to contents

Starts quarto::quarto_preview() so a revealjs (or html) slide deck is available locally. With frp = TRUE the preview is also published through FRP using .cursor/frp.toml. The R session stays usable. Call qmd_stop_presentation() to stop the server.

Stops the FRP client (if running) and the Quarto preview, then kills any leftover Quarto/Deno process still listening on port.

Usage

qmd_render_presentation(
  qmd,
  port = NULL,
  host = "0.0.0.0",
  render = "auto",
  watch = TRUE,
  browse = TRUE,
  quiet = FALSE,
  frp = TRUE
)

qmd_stop_presentation(port = NULL, quiet = FALSE)

Arguments

qmd

Path to a .qmd file, or a directory that contains one. If a directory has several .qmd files, a name matching presentation is preferred.

port

Local TCP port to free. If NULL (default), uses remotePort from .cursor/frp.toml when that file exists.

host

Hostname to bind. Default "0.0.0.0" so other PCs on the LAN can connect. Use "127.0.0.1" for local-only access.

render

Passed to quarto::quarto_preview(). For a document, TRUE / "auto" renders before serving; FALSE skips the initial render.

watch

Re-render when the source changes (default TRUE).

browse

Open a browser (default TRUE).

quiet

Suppress messages.

frp

If TRUE (default), start frpc using .cursor/frp.toml.

Value

Invisibly, the preview URL (character).

See also

Examples

if (FALSE) { # \dontrun{
qmd_render_presentation("path/to/slides.qmd")
qmd_stop_presentation()
} # }