Package 'brand'

Title: Personal Brand for Quarto and pkgdown
Description: Custom theming using a single 'brand.yml' file that 'Quarto' reads directly, paired with the 'pkgdown' template package that consumes the same file, so documents, websites, and package reference sites share one light and dark theme.
Authors: Visruth Srimath Kandali [aut, cre, cph]
Maintainer: Visruth Srimath Kandali <[email protected]>
License: GPL (>= 3)
Version: 2.0.0
Built: 2026-10-08 07:59:22 UTC
Source: https://github.com/VisruthSK/brand

Help Index


Path to this package's ⁠_brand.yml⁠

Description

A single brand.yml file describing the light and dark palettes, in the form Quarto reads directly.

Usage

brand_file()

Value

Absolute path to the installed ⁠_brand.yml⁠.


Site configuration that applies this brand

Description

pkgdown::build_site() reads ⁠_pkgdown.yml⁠ without evaluating !expr tags, so the Bootstrap variables derived from ⁠_brand.yml⁠ cannot come from the file itself. Pass them as override, which pkgdown merges into the site config before handing template.bslib to bslib::bs_theme():

Usage

pkgdown_override(..., path = brand_file())

Arguments

...

Further ⁠_pkgdown.yml⁠ values, such as destination.

path

A ⁠_brand.yml⁠, in the form described in brand_file().

Details

pkgdown::build_site(override = brand::pkgdown_override())

Value

A list suitable for the override argument of pkgdown::build_site() and pkgdown::build_site_github_pages().


Copy this package's ⁠_brand.yml⁠ into a project

Description

Quarto picks up a ⁠_brand.yml⁠ sitting beside ⁠_quarto.yml⁠, so a document, book, or website styled by the copy matches any pkgdown site built with template: package: brand.

Usage

use_brand(file = "_brand.yml", use_fonts = FALSE)

Arguments

file

Path to copy brand_file() to.

use_fonts

Also copy this package's ⁠inst/fonts/⁠ next to file, and point the copy at those files rather than at the web. Only self-hosted families need this, and only for Typst: Quarto fetches Google families for a PDF itself, and a browser resolves either from the web. Each source: file face wants a TTF or OTF in ⁠inst/fonts/⁠ named ⁠<family>-<weight>-<style>⁠; one with no such file is an error.

Value

file, invisibly.