use_brand() copies the openwashdata brand definition (_brand.yml)
and the logo files it references from the central
openwashdata/brand repository
into the package root. Re-running the function refreshes an existing
copy and reports which files changed, so consuming packages stay in
sync with the central definition.
Brand values are never edited locally: change them in
openwashdata/brand first, then refresh consumers with use_brand().
Arguments
- ref
Character. Git reference (branch or tag) of openwashdata/brand to copy from. Defaults to
"main".- pkgdown
Logical. Should
_pkgdown.ymlbe wired to use the brand via bslib? Defaults toTRUE.- source
Character. Advanced: an alternative source for the brand files, either a local directory or a URL prefix. When
NULL(the default), the raw GitHub content of openwashdata/brand atrefis used. Mainly useful for tests and offline work.
Value
Invisibly, a character vector of the files written or updated (empty when everything was already current).
Details
With pkgdown = TRUE (the default), an existing _pkgdown.yml is
pointed at the brand through bslib (template.bslib.brand), so the
next pkgdown::build_site() renders the site with the brand fonts
and colors. The wiring rewrites _pkgdown.yml through the yaml
package, which does not preserve comments in that file. When no
_pkgdown.yml exists, the wiring is skipped with a hint to run
setup_website() first. Building the wired site requires the
brand.yml package (bslib asks for it at build time); it is listed in
Suggests and installed on demand.
See also
Before: setup_website(), which writes the _pkgdown.yml this wires.
For branded PDF and Word reports that read the installed _brand.yml,
the openwashdata Quarto extension
quarto-owd.
Other publishing functions:
setup_readme(),
setup_website()