publish_notebook: Publish a Quarto notebook to S3

View source: R/publish.R

publish_notebookR Documentation

Publish a Quarto notebook to S3

Description

Renders a Quarto document and uploads it to S3. The notebook is rendered to a temporary directory, uploaded, then cleaned up.

Usage

publish_notebook(
  file,
  dest = NULL,
  connection = NULL,
  self_contained = TRUE,
  format = "html",
  ...
)

Arguments

file

Character. Path to .qmd file.

dest

Character or NULL. Destination path in S3 (without extension). If NULL, derives from filename (e.g., "analysis.qmd" -> "analysis").

connection

Character or NULL. S3 connection name, or NULL for default.

self_contained

Logical. Whether to embed all resources. Default TRUE. Ignored if static_hosting: false (always renders self-contained).

format

Character. Output format. Default "html".

...

Additional arguments passed to quarto render.

Details

The URL format depends on the S3 connection's static_hosting setting:

  • static_hosting: true -> uploads to dest/index.html, returns ⁠dest/⁠

  • static_hosting: false (default) -> uploads as dest.html, returns dest.html

Value

Character. Public URL of the published notebook.

Examples


if (FALSE) {
# With static_hosting: true -> returns /analysis/
# With static_hosting: false -> returns /analysis.html
publish_notebook("notebooks/analysis.qmd")

# Publish to specific location
publish_notebook("notebooks/analysis.qmd", dest = "reports/2024/q4")

# Publish non-self-contained (only with static_hosting: true)
publish_notebook("notebooks/analysis.qmd", self_contained = FALSE)
}


framework documentation built on Feb. 18, 2026, 1:07 a.m.