R/init.R

Defines functions init_site

Documented in init_site

#' Initialize site infrastructure offline
#'
#' Sets up the necessary infrastructure for building a pkgdown site offline
#' by copying locally cached dependencies to the pkgdown cache directory.
#'
#' @param ... Arguments passed to [pkgdown::init_site()].
#'
#' @return Invisible `NULL`, called for side effect of initializing site resources.
#'
#' @importFrom utils packageVersion
#'
#' @export
#'
#' @examples
#' \dontrun{
#' pkgdown.offline::init_site(override = list(destination = tempdir()))
#' }
init_site <- function(...) {
  copy_to_cache(packageVersion("pkgdown"))
  stub_with_null("pkgdown", "build_favicons")
  pkgdown::init_site(...)
}

Try the pkgdown.offline package in your browser

Any scripts or data that you put into this service are public.

pkgdown.offline documentation built on June 8, 2025, 1:59 p.m.