Skip to content

Commit f9de2d3

Browse files
committed
Add applying brand section
1 parent 708597a commit f9de2d3

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

docs/authoring/brand.qmd

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ View the example: [Source](https://github.com/cwickham/quarto-examples/tree/bran
5959

6060
On this page:
6161

62+
- Learn how to add a brand file
63+
6264
- Learn about the elements of **brand.yml** and how they are used in Quarto.
6365

6466
- Learn how to access brand values outside of the brand file.
@@ -73,6 +75,46 @@ The **brand.yml** specification is an active area of work at Posit. Quarto's sup
7375
Currently, the formats that support **brand.yml** are: `html`, `dashboard`, `revealjs` and `typst`.
7476
:::
7577

78+
## Applying Brand
79+
80+
To specify a brand, create a `_brand.yml` file in the root directory of your project. *Do you need a project? Do we reccommend a project? *
81+
Quarto will detect the presence of `_brand.yml` and automatically apply the brand to all documents of the supported formats in the project.
82+
83+
You can also set, or override, brand settings in a document by specifying brand elements under the `brand` option:
84+
85+
```{.yaml filename="document.qmd"}
86+
---
87+
brand:
88+
color:
89+
background: "#ffffff"
90+
---
91+
```
92+
93+
You can disable brand for a document by setting `brand: false`:
94+
95+
```{.yaml filename="document.qmd"}
96+
---
97+
brand: false
98+
---
99+
```
100+
101+
You can put `_brand.yml` in a subdirectory of your project, and then use the `brand` key to specify the path to the brand file.
102+
For example, to the the brand file at `brand/_brand.yml` for a single document, add `brand` to the header:
103+
104+
```{.yaml filename="document.qmd"}
105+
---
106+
brand: brand/_brand.yml
107+
---
108+
```
109+
110+
To use the brand file at `brand/_brand.yml` for all documents in the project add `brand` to `_quarto.yml`:
111+
112+
```{.yaml filename="_quarto.yml"}
113+
brand: brand/_brand.yml
114+
```
115+
116+
Paths specified in `_brand.yml` are relative to the location of the brand file. (*Is this true?*)
117+
76118
## Brand Elements
77119

78120
The elements of **brand.yml** are specified in the specification at <https://posit-dev.github.io/brand-yml/>. In this section, learn how these elements are used in Quarto.

0 commit comments

Comments
 (0)