Skip to content

Commit fb16fb9

Browse files
brand extension; typst page partial
(cherry picked from commit a191633)
1 parent f4ceac5 commit fb16fb9

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

_quarto.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,10 @@ website:
474474
- docs/extensions/formats.qmd
475475
- docs/extensions/revealjs.qmd
476476
- docs/extensions/project-types.qmd
477+
- docs/extensions/starter-templates.qmd
477478
- text: "Metadata Extensions"
478479
href: docs/extensions/metadata.qmd
479-
- docs/extensions/starter-templates.qmd
480+
- docs/extensions/brand.qmd
480481

481482
- id: reference
482483
title: "Reference"

docs/authoring/brand.qmd

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,14 @@ Some values from the `_brand.yml` configuration file can be accessed via the `br
593593
`VARIANT` is optional:
594594

595595
- For the `brand color` shortcode, the default is `light`. To return the color from the [dark brand](#dark-brand) use `dark`.
596-
- For the `brand logo` shortcode, the default is `both`, which will add both light and dark logos with appropriate classes
596+
- For the `brand logo` shortcode, the default is `both`, which will expand to both light and dark logos with the appropriate [classes for mode-specific content](../output-formats/html-themes.qmd#mode-specific-content) so that the light logo shows in light mode and the dark logo shows in dark mode.
597+
598+
::: {.callout-note}
599+
600+
If the `VARIANT` is `light` or `dark`, the `brand logo` shortcode will not add a mode-specific class.
601+
602+
:::
603+
597604

598605
For example, you could use the shortcode to place a brand image you've named `icon` in a dashboard sidebar:
599606

@@ -697,11 +704,26 @@ local brand = require('modules/brand/brand')
697704
local primary = brand.get_color('primary')
698705
```
699706

700-
## Migrating to `_brand.yml`: use the `brand` string in `theme`
707+
## Sharing brands across projects
708+
709+
::: callout-note
710+
711+
Note that Quarto requires all assets, including logos and font files, to live in a single directory tree with `_quarto.yml` at the root. Using a path to a `brand.yml` file outside of that directory tree will not work correctly.
712+
713+
:::
714+
715+
Quarto 1.8 introduces the [brand extension](../extensions/brand.qmd), a Quarto-specific way to distribute brand metadata and assets using a Git repository.
716+
717+
Quarto extensions install to the `_extensions/` subdirectory of your project. You will have a copy of the brand metadata and assets in each project; use [`quarto update`](../extensions/managing.qmd#updating) to update the brand extension from its repository.
718+
719+
Quarto 1.9 will introduce `quarto use brand` for a simpler way to share brands. Watch [this page on the prerelease documentation](https://prerelease.quarto.org/docs/authoring/brand.html#sharing-brands-across-projects) for availability.
720+
721+
722+
## Combining brands and themes
701723

702724
::: callout-note
703725

704-
The following information is only necessary if you are migrating projects created with Quarto 1.5 and earlier to use `_brand.yml`.
726+
The following information is only necessary if you want to combine bootswatch themes with `_brand.yml`.
705727

706728
:::
707729

docs/journals/templates.qmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ typst-template.typ
136136

137137
: The definition of the Typst template function that will be called on the entire document contents. In the default template this function is called `article()` and generates a title block and author list, followed by the document content, optionally laid out in columns.
138138

139+
page.typ
140+
141+
: Sets properties of the page such as size, margin, numbering, and background logo.
142+
139143
typst-show.typ
140144

141145
: A show rule for the entire document that captures document metadata and passes it to the function defined in `typst-template.typ`.

0 commit comments

Comments
 (0)