You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,6 +36,12 @@ Quarto will detect the presence of `_brand.yml` and automatically apply the bran
36
36
You can create a `_brand.yml` file outside of a Quarto project (e.g. without a `_quarto.yml`).
37
37
In this case, `_brand.yml` will automatically apply to documents in the same directory.
38
38
39
+
```{.yaml filename="_brand.yml"}
40
+
color:
41
+
background: "#eeeeee"
42
+
```
43
+
44
+
39
45
You can also set brand options in a document by specifying brand elements under the `brand` option:
40
46
41
47
```{.yaml filename="document.qmd"}
@@ -73,9 +79,59 @@ brand: brand/_brand.yml
73
79
74
80
Paths specified in `_brand.yml` are relative to the location of the brand file.
75
81
76
-
### Dark Brand
82
+
### Light and Dark Colors
83
+
84
+
To specify colors for both light and dark modes using a single brand.yml file, specify any color in `color` or `typography` with an object containing the `light` and `dark` colors:
85
+
86
+
```{.yaml filename="_brand.yml"}
87
+
color:
88
+
background:
89
+
light: "#ffffff"
90
+
dark: "#333333"
91
+
foreground:
92
+
light: "#333333"
93
+
dark: "#ffffff"
94
+
typography:
95
+
headings:
96
+
color:
97
+
light: "#111144"
98
+
dark: "#d0d0ff"
99
+
```
100
+
101
+
This also works with the brand specified directly in the document metadata:
77
102
78
-
As with [Themes](/docs/output-formats/html-themes.qmd#dark-mode), you can specify both light and dark brands, making both a light and a dark version of your output available:
103
+
104
+
```{.yaml filename="document.qmd"}
105
+
---
106
+
brand:
107
+
color:
108
+
background:
109
+
light: "#ffffff"
110
+
dark: "#333333"
111
+
foreground:
112
+
light: "#333333"
113
+
dark: "#ffffff"
114
+
typography:
115
+
headings:
116
+
color:
117
+
light: "#111144"
118
+
dark: "#d0d0ff"
119
+
---
120
+
```
121
+
122
+
123
+
::: {.callout-warning}
124
+
125
+
## Limitation
126
+
127
+
Colors in [the `palette`](#color) cannot currently be specified with `light` and `dark` variants.
128
+
129
+
:::
130
+
131
+
132
+
### Light and Dark Brands
133
+
134
+
If you prefer to author separate light and dark brands for light and dark mode, or you need to customize non-color properties, you can separate the brands into their own files, and specify `light` and `dark` brand files:
79
135
80
136
```{.yaml filename="document.qmd"}
81
137
---
@@ -85,6 +141,8 @@ brand:
85
141
---
86
142
```
87
143
144
+
This is similar to how [Themes](/docs/output-formats/html-themes.qmd#dark-mode) work.
145
+
88
146
This also works with brands specified directly in the document:
89
147
90
148
```{.yaml filename="document.qmd"}
@@ -109,19 +167,23 @@ brand:
109
167
dark: dark-brand.yml
110
168
```
111
169
112
-
113
170
::: {.callout-warning}
114
171
115
172
## Limitation
116
173
117
-
The `revealjs` format does not support switching between light and dark modes.
174
+
Brand metadata cannot currently be specified directly in `_quarto.yml`, only via the file syntax.
118
175
119
-
:::
176
+
:::
120
177
121
178
122
-
#### Typst
123
179
124
-
To choose a dark brand in Typst output use `brand-mode: dark`:
180
+
### Brand Mode
181
+
182
+
The Typst and revealjs formats do not produce outputs which can toggle between light and dark mode dynamically.
183
+
184
+
Setting `brand-mode: dark` will cause either format to render using the dark brand.
185
+
186
+
Typst:
125
187
126
188
```{.yaml filename="document.qmd"}
127
189
---
@@ -131,6 +193,16 @@ format:
131
193
---
132
194
```
133
195
196
+
Revealjs:
197
+
198
+
```{.yaml filename="document.qmd"}
199
+
---
200
+
format:
201
+
revealjs:
202
+
brand-mode: dark
203
+
---
204
+
```
205
+
134
206
135
207
## Brand Elements
136
208
@@ -257,15 +329,7 @@ logo:
257
329
path: https://quarto.org/quarto.png
258
330
alt: "Quarto icon"
259
331
small: quarto-logo
260
-
```
261
-
262
-
::: {.callout-warning}
263
-
264
-
## Limitation
265
-
266
-
The **brand.yml** specification allows you to specify a `light` and `dark` version of your logo, but Quarto currently only uses the `light` version.
267
-
268
-
:::
332
+
```
269
333
270
334
#### Document logo customization
271
335
@@ -278,7 +342,15 @@ logo: large
278
342
---
279
343
```
280
344
281
-
Or, specify a brand logo and change the alt text:
345
+
Or override the brand logo for this document with a logo from a file:
346
+
347
+
```{.yaml filename="document.qmd"}
348
+
---
349
+
logo: logo.png
350
+
---
351
+
```
352
+
353
+
Or specify a brand logo resource and change the alt text:
282
354
283
355
```{.yaml filename="document.qmd"}
284
356
---
@@ -288,6 +360,21 @@ logo:
288
360
---
289
361
```
290
362
363
+
You can also individually customize light and dark logos, with any of the variations shown above:
364
+
365
+
```{.yaml filename="document.qmd"}
366
+
---
367
+
logo:
368
+
light:
369
+
path: large
370
+
alt: Alternate alternate text
371
+
dark:
372
+
path: dark-logo.png
373
+
alt: Alternate text for dark logo
374
+
---
375
+
```
376
+
377
+
291
378
::: {.callout-warning}
292
379
293
380
## Limitation
@@ -296,35 +383,7 @@ It is [not currently possible](https://github.com/quarto-dev/quarto-cli/issues/1
296
383
297
384
:::
298
385
299
-
The Typst implementation allows customization of the logo position at the document level:
|`padding`, `padding-top`,| Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions.|
323
-
|`padding-right`, | Padding options are applied in alphabetical order. |
324
-
|`padding-bottom`, | Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). |
The Typst implementation allows [customization of the logo position](../output-formats/typst.qmd#logo-position).
328
387
329
388
### Typography
330
389
@@ -342,13 +401,6 @@ typography:
342
401
The properties you can set for a font under `fonts` depends on the `source`. You can see the other properties available in our [Reference for Brand](/docs/reference/metadata/brand.qmd#font-resource-definitions).
343
402
344
403
345
-
::: {.callout-warning}
346
-
## Limitation
347
-
348
-
HTML formats do not currently support `source: file`.
349
-
:::
350
-
351
-
352
404
You can then refer to fonts by `family` in the remaining typography options:
Copy file name to clipboardExpand all lines: docs/extensions/metadata.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,14 @@ Currently, metadata extensions only merge project-level metadata. This limitatio
14
14
15
15
Here we'll describe how to create a simple metadata extension. We'll use the `quarto create` command to do this. If you are using VS Code, Positron, or RStudio you should execute `quarto create` within their respective integrated Terminal panes.
16
16
17
-
To get started, execute `quarto create extension metadata` within the parent directory where you'd like the filter extension to be created:
17
+
To get started, execute `quarto create extension metadata` within the parent directory where you'd like the metadata extension to be created:
18
18
19
19
```{.bash filename="Terminal"}
20
20
$ quarto create extension metadata
21
21
? Extension Name › my-prerender-scripts
22
22
```
23
23
24
-
As shown above, you'll be prompted for an extension name. Type `my-prerender-scripts` and press Enter---the filter extension is then created:
24
+
As shown above, you'll be prompted for an extension name. Type `my-prerender-scripts` and press Enter---the metadata extension is then created:
Copy file name to clipboardExpand all lines: docs/output-formats/typst.qmd
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -288,6 +288,38 @@ fontsize: 11pt
288
288
---
289
289
```
290
290
291
+
## Logo Position
292
+
293
+
If there is a logo [from brand.yml](../authoring/brand.qmd#logo) or specified directly in the document, Quarto's Typst implementation allows customization of the logo position in the document (or project):
| `padding`, `padding-top`,| Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions.|
317
+
| `padding-right`, | Padding options are applied in alphabetical order. |
318
+
| `padding-bottom`, | Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). |
Typst has great support for SVG graphics, so `format: typst` defaults to `fig-format: svg`. This configuration means executable code cells that produce images will produce `.svg` output.
0 commit comments