R/open_pkgdown.R

Defines functions open_pkgdown

Documented in open_pkgdown

#' Open pkgdown site of the package
#'
#' @importFrom utils browseURL
#'
#' @export
open_pkgdown <- function() {
  guide_path <- system.file("docs/index.html", package = "buildtools")
  if (guide_path == "") {
    stop("There is no pkgdown site in ", "docs/index.html")
  }

  browseURL(paste0("file://", guide_path))
}
jimbrig/buildtools documentation built on July 1, 2023, 4:06 p.m.