Skip to content

Commit a082123

Browse files
proper schema for typst logo
fixes #12180 needs separate schema because path is optional for typst logo object
1 parent bf03850 commit a082123

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
- name: logo
22
tags:
3-
formats: [revealjs, typst]
4-
schema:
5-
anyOf:
6-
- string
7-
- object
3+
formats: [revealjs]
4+
schema: string
85
description: "Logo image (placed in bottom right corner of slides)"
96

107
- 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."

0 commit comments

Comments
 (0)