publish_notebook()
Publish a Quarto notebook to S3
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
| Name | Description |
|---|---|
| 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 |
| format |
Character. Output format. Default "html". |
| ... |
Additional arguments passed to quarto render. |
Value
Character. Public URL of the published notebook.
Details
The URL format depends on the S3 connection's static_hosting setting:
static_hosting: true-> uploads todest/index.html, returnsdest/static_hosting: false(default) -> uploads asdest.html, returnsdest.html
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)
}