Skip to contents

Convenience wrapper around the rprojroot::is_pkgdown_project root criterion. Note that it will by default only return TRUE for the root of a package directory and the pkgdown subdirectory, not other subdirectories.

Usage

is_pkgdown_dir(path = ".", check_parent_dirs = FALSE)

Arguments

path

Path of the R package directory to check. A character scalar. Defaults to the current working directory.

check_parent_dirs

Whether or not to also check path's parent directories (up until the filesystem root) for a pkgdown setup. Setting check_parent_dirs = TRUE guarantees that TRUE is returned for all subdirectories of an R package that has pkgdown set up.

Value

TRUE if pkgdown is set up for path, FALSE otherwise.

See also

Other R package functions: assert_pkg(), is_pkg_cran(), is_pkg_dir(), is_pkg_installed(), ls_pkg(), use_pkg()

Examples

pal::is_pkgdown_dir()
#> [1] FALSE
pal::is_pkgdown_dir(fs::path_package("pal"))
#> [1] FALSE