|
1 | | -#' Execute \pkg{pkgdown} build_site in a package |
| 1 | +#' Run `pkgdown::build_site()` |
2 | 2 | #' |
3 | | -#' `build_site()` is a shortcut for [pkgdown::build_site()], it generates the |
4 | | -#' static HTML documentation. |
| 3 | +#' This is a thin wrapper around [pkgdown::build_site()], used for generating |
| 4 | +#' static HTML documentation. Learn more at <https://pkgdown.r-lib.org>. |
5 | 5 | #' |
6 | | -#' @param path path to the package to build the static HTML. |
7 | | -#' @param ... additional arguments passed to [pkgdown::build_site()] |
8 | | -#' @inheritParams install |
9 | | -#' |
10 | | -#' @return NULL |
| 6 | +#' @param path Path to the package to build the static HTML. |
| 7 | +#' @param ... Additional arguments passed to [pkgdown::build_site()]. |
11 | 8 | #' @export |
12 | | -build_site <- function(path = ".", quiet = TRUE, ...) { |
| 9 | +build_site <- function(path = ".", ...) { |
13 | 10 | rlang::check_installed("pkgdown") |
14 | 11 |
|
15 | 12 | save_all() |
16 | | - |
17 | | - pkg <- as.package(path) |
18 | | - |
19 | | - check_dots_used(action = getOption("devtools.ellipsis_action", rlang::warn)) |
20 | | - |
21 | | - withr::with_temp_libpaths(action = "prefix", code = { |
22 | | - install(pkg = pkg$path, upgrade = "never", reload = FALSE, quiet = quiet) |
23 | | - if (isTRUE(quiet)) { |
24 | | - withr::with_output_sink( |
25 | | - file_temp(), |
26 | | - pkgdown::build_site(pkg = pkg$path, ...) |
27 | | - ) |
28 | | - } else { |
29 | | - pkgdown::build_site(pkg = pkg$path, ...) |
30 | | - } |
31 | | - }) |
| 13 | + pkgdown::build_site(pkg = path, ...) |
32 | 14 | } |
0 commit comments