Commit 9a0da8c
fix(preview): sync sibling _brand.yml in single-file q2 preview (bd-ggvq1j68)
`q2 preview deck.qmd` on a bare file (no `_quarto.yml` ancestor) runs
single-file mode, which deliberately does not walk the directory — so a deck
referencing `brand: _brand.yml` failed brand resolution with "Path not found:
/project/_brand.yml" (the sibling never reached the preview VFS).
Pick up conventionally-named brand siblings (`_brand.yml`/`_brand.yaml`) that
physically sit next to the target file, without walking the directory — so the
bd-tnm3k "don't pull in arbitrary siblings" safety property is preserved. A
deck whose `brand:` points elsewhere (e.g. `../shared/foo.yml`) is still
unsupported in single-file mode; author it inside a project instead.
E2E: `q2 preview deck.qmd` with a sibling `_brand.yml` now applies the brand
theme (bg #fdf6ff, fg #2a1a3a, heading #6f42c1, Georgia) — matching `q2 render`.
Tests: `test_single_file_picks_up_brand_sibling`,
`test_single_file_no_brand_sibling_stays_narrow`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 650cbdd commit 9a0da8c
2 files changed
Lines changed: 75 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
167 | 191 | | |
168 | 192 | | |
169 | 193 | | |
| |||
344 | 368 | | |
345 | 369 | | |
346 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
347 | 415 | | |
348 | 416 | | |
349 | 417 | | |
| |||
0 commit comments