R/copy_quarto_site.R
copy_quarto_site.RdCopies the contents of a Quarto site's output directory (default '_site') to a specified target directory. Handles overwriting, parent directory creation, and prevents copying into itself.
copy_quarto_site(
source_dir = "_site",
target_dir = NULL,
overwrite = TRUE,
create_parent = TRUE,
verbose = TRUE
)Character scalar. Source directory to copy from (default '_site').
Character scalar. Target directory to copy to. Must be provided. If null (default), it will attempt to copy to the workspace folder determined by `find_ws()` and project name from `get_prj_name()`.
Logical scalar. If TRUE, overwrites existing target directory (default TRUE).
Logical scalar. If TRUE, creates parent directory if it does not exist (default TRUE).
Logical scalar. If TRUE, prints progress messages (default TRUE).
Invisibly returns the target directory path, or `NULL` if default `target_dir` cannot be determined.
if (FALSE) { # \dontrun{
copy_quarto_site(source_dir = "_site", target_dir = "docs")
} # }