Skip to content

Commit 0b7dd32

Browse files
proper schemas for typst and revealjs logos
fixes #12180 typst needs separate schema because path is optional for typst logo object
1 parent bf03850 commit 0b7dd32

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

news/changelog-1.8.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ All changes included in 1.8:
4343

4444
### `typst`
4545

46+
- ([#12180](https://github.com/quarto-dev/quarto-cli/issues/12180): Typst schema / autocomplete for `logo` option has `path` and `alt`.
4647
- ([#12554](https://github.com/quarto-dev/quarto-cli/pull/12554)): CSS properties `font-weight` and `font-style` are translated to Typst `text` properties.
4748
- ([#12695](https://github.com/quarto-dev/quarto-cli/issues/12695)): Resolve Typst `font-paths` that start with `/` relative to project root.
4849
- ([#12739](https://github.com/quarto-dev/quarto-cli/pull/12739)): Remove unused variable `heading-background-color` and `heading-decoration` from Typst's templates. They are leftover from previous change, and not part of Brand.yml schema for typography of headings.

src/resources/schema/definitions.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,6 +2619,25 @@
26192619
- schema:
26202620
ref: logo-options
26212621

2622+
- id: logo-options-path-optional
2623+
object:
2624+
closed: false # e.g. to allow typst location, padding, padding-*, width
2625+
properties:
2626+
path:
2627+
schema: path
2628+
description: >
2629+
Path or brand.yml logo resource name.
2630+
alt:
2631+
schema: string
2632+
description: >
2633+
Alternative text for the logo, used for accessibility.
2634+
2635+
- id: logo-specifier-path-optional
2636+
anyOf:
2637+
- string
2638+
- schema:
2639+
ref: logo-options-path-optional
2640+
26222641
- id: logo-light-dark-specifier
26232642
description: >
26242643
Any of the ways a logo can be specified: string, object, or light/dark object of

src/resources/schema/document-reveal-content.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
- name: logo
22
tags:
3-
formats: [revealjs, typst]
3+
formats: [revealjs]
44
schema:
5-
anyOf:
6-
- string
7-
- object
5+
ref: logo-specifier
86
description: "Logo image (placed in bottom right corner of slides)"
97

108
- name: footer
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: logo
2+
schema:
3+
ref: logo-specifier-path-optional
4+
tags:
5+
formats: [typst]
6+
description: "The logo image."

tests/docs/smoke-all/brand/logo/override-logo-path-alt.qmd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
---
22
title: brand and base logo
33
format:
4-
dashboard: default
4+
dashboard:
5+
logo:
6+
path: posit-logo-2024.svg
7+
alt: posit logo
8+
revealjs: # test schema
9+
logo:
10+
path: posit-logo-2024.svg
11+
alt: posit logo
512
brand:
613
logo:
714
images:
@@ -13,9 +20,6 @@ brand:
1320
alt: posit logo
1421
medium: quarto
1522
large: posit
16-
logo:
17-
path: posit-logo-2024.svg
18-
alt: posit logo
1923
_quarto:
2024
tests:
2125
dashboard:

0 commit comments

Comments
 (0)