use_civilytics_theme() ships _brand.yml wrapped in a top-level 'brand:' key that Quarto >=1.9 rejects #5

Closed
opened 2026-06-02 14:37:56 -04:00 by jared · 3 comments
Owner

Summary

use_civilytics_theme() (and use_civilytics_brand()) install a _brand.yml
whose contents are nested under a top-level brand: key. Quarto 1.9.x rejects
this when it auto-discovers the project _brand.yml, so quarto render /
quarto inspect fail for every document in the project.

Environment

  • civilytics 0.2.0 (gitea.civilytics.org/Civilytics/civilyticsR)
  • Quarto 1.9.37
  • R 4.6.0

Steps to reproduce

  1. Fresh project: Rscript -e 'civilytics::use_civilytics_theme(".")'
  2. Add any doc.qmd.
  3. quarto inspect doc.qmd (or quarto render doc.qmd).

Observed

ERROR: Brand validation failed for <project>/_brand.yml.
In file _brand.yml
(line 5, columns 1--6) property name brand is invalid
5: brand:
   ~~~~~~
6:   meta:

Cause

The shipped inst/quarto/_brand.yml is structured as:

brand:
  meta: ...
  logo: ...
  color: ...
  typography: ...

A standalone _brand.yml expects meta/logo/color/typography at the
top level (no brand: wrapper) per the brand.yml spec
(https://quarto.org/docs/authoring/brand.html). The brand: wrapper is only
valid when embedded inside _quarto.yml (e.g. project: { brand: ... } or a
format's brand: field), not as the _brand.yml file itself. Older Quarto was
lenient; 1.9.x validates strictly.

Suggested fix

Remove the top-level brand: key in inst/quarto/_brand.yml and de-indent its
children by two spaces so meta/logo/color/typography are top-level.
Verified locally: unwrapping resolves the error and the brand applies across
HTML/PDF/Typst with no other changes.

Workaround

After use_civilytics_theme(), edit the copied _brand.yml to remove the
brand: wrapper (de-indent the remaining keys).


Filed while integrating the civilytics Quarto theme into the CRDC arrests
artifact-reproduction work.

## Summary `use_civilytics_theme()` (and `use_civilytics_brand()`) install a `_brand.yml` whose contents are nested under a top-level `brand:` key. Quarto 1.9.x rejects this when it auto-discovers the project `_brand.yml`, so `quarto render` / `quarto inspect` fail for **every** document in the project. ## Environment - civilytics 0.2.0 (gitea.civilytics.org/Civilytics/civilyticsR) - Quarto 1.9.37 - R 4.6.0 ## Steps to reproduce 1. Fresh project: `Rscript -e 'civilytics::use_civilytics_theme(".")'` 2. Add any `doc.qmd`. 3. `quarto inspect doc.qmd` (or `quarto render doc.qmd`). ## Observed ``` ERROR: Brand validation failed for <project>/_brand.yml. In file _brand.yml (line 5, columns 1--6) property name brand is invalid 5: brand: ~~~~~~ 6: meta: ``` ## Cause The shipped `inst/quarto/_brand.yml` is structured as: ```yaml brand: meta: ... logo: ... color: ... typography: ... ``` A standalone `_brand.yml` expects `meta`/`logo`/`color`/`typography` at the **top level** (no `brand:` wrapper) per the brand.yml spec (https://quarto.org/docs/authoring/brand.html). The `brand:` wrapper is only valid when embedded **inside** `_quarto.yml` (e.g. `project: { brand: ... }` or a format's `brand:` field), not as the `_brand.yml` file itself. Older Quarto was lenient; 1.9.x validates strictly. ## Suggested fix Remove the top-level `brand:` key in `inst/quarto/_brand.yml` and de-indent its children by two spaces so `meta`/`logo`/`color`/`typography` are top-level. Verified locally: unwrapping resolves the error and the brand applies across HTML/PDF/Typst with no other changes. ## Workaround After `use_civilytics_theme()`, edit the copied `_brand.yml` to remove the `brand:` wrapper (de-indent the remaining keys). --- _Filed while integrating the civilytics Quarto theme into the CRDC arrests artifact-reproduction work._
jared added the bug label 2026-06-02 14:37:56 -04:00
Member

Fixed in PR #6: unwrapped _brand.yml — removed the top-level brand: wrapper so meta/ logo/ color/ typography are at the top level per the Quarto 1.9+ spec. #6

Fixed in PR #6: unwrapped `_brand.yml` — removed the top-level `brand:` wrapper so `meta`/ `logo`/ `color`/ `typography` are at the top level per the Quarto 1.9+ spec. https://gitea.civilytics.org/Civilytics/civilyticsR/pulls/6
kodor was assigned by jared 2026-06-17 19:05:48 -04:00
Member

kodor produced no usable change (opencode exited 0 with no file changes; attempt 1/2); will retry next run.

kodor produced no usable change (opencode exited 0 with no file changes; attempt 1/2); will retry next run. <!-- kodor:attempt=1 -->
Member

kodor produced no usable change (opencode exited 0 with no file changes; attempt 2/2). Handing back — reassign me to retry.

kodor produced no usable change (opencode exited 0 with no file changes; attempt 2/2). Handing back — reassign me to retry. <!-- kodor:attempt=2 -->
kodor removed their assignment 2026-06-18 09:29:33 -04:00
jared closed this issue 2026-06-18 09:39:57 -04:00
Sign in to join this conversation.
No labels bug
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/civilyticsR#5