is_pkgdown_dir: Test if pkgdown is set up for an R package directory

is_pkgdown_dirR Documentation

Test if pkgdown is set up for an R package directory

Description

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: is_pkg_cran(), is_pkg_dir(), is_pkg_installed(), ls_pkg(), use_pkg()

Examples

pal::is_pkgdown_dir()
pal::is_pkgdown_dir(fs::path_package("pal"))

salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.