Turn-key retrofit to adopt the albersdown theme in an existing package. Copies local assets for CRAN-safe vignettes, ensures pkgdown template, optionally patches all vignettes, writes a README note, and prints a doctor report.
Arguments
- path
Path to the package directory. Must be supplied explicitly; there is no default so that the function never writes to an unexpected location.
- family
one of: "red","lapis","ochre","teal","green","violet"
- preset
Visual preset (default
"homage"). Seealbers_presets().- apply_to
"all" to patch every .Rmd/.qmd in vignettes/, or "new" to only add the template and assets
- dry_run
if TRUE, show changes without writing
- fallback_extra
Controls copying site-wide fallbacks into
pkgdown/:"auto": copy
pkgdown/extra.cssandpkgdown/extra.jsonly when the consuming package does not usetemplate: { package: albersdown }in_pkgdown.yml."always": always copy to
pkgdown/(useful as a safety net or for custom setups)."never": never copy site-wide fallbacks.
- force_replace
if TRUE (default), overwrite existing albersdown assets and replace existing vignette CSS/header hooks so albersdown becomes the active theme.
Examples
# \donttest{
if (interactive()) {
use_albersdown(path = ".", dry_run = TRUE)
}
# }