Skip to content

Commit 73eb26f

Browse files
tests for projectless brand extension
1 parent e7d03f4 commit 73eb26f

File tree

13 files changed

+138
-0
lines changed

13 files changed

+138
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: My-brand
2+
author: Gordon Woodhull
3+
version: 1.0.0
4+
quarto-required: ">=99.9.0"
5+
contributes:
6+
metadata:
7+
project:
8+
brand: mybrand.yml
67.8 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
logo:
2+
images:
3+
sun:
4+
path: sun-face.png
5+
alt: sun face
6+
moon:
7+
path: moon-face.png
8+
alt: moon face
9+
medium:
10+
light: sun
11+
dark: moon
12+
color:
13+
background:
14+
light: "#def"
15+
dark: "#042"
16+
foreground:
17+
light: "#411"
18+
dark: "#ffe"
80.7 KB
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: test brand extension
3+
format:
4+
dashboard: default
5+
revealjs: default
6+
typst:
7+
output-ext: typ
8+
_quarto:
9+
tests:
10+
dashboard:
11+
ensureFileRegexMatches:
12+
-
13+
- '<img src="_extensions(/|\\)my-brand(/|\\)sun-face\.png" alt="sun face" class=".*light-content.*">'
14+
- '<img src="_extensions(/|\\)my-brand(/|\\)moon-face\.png" alt="moon face" class=".*dark-content.*">'
15+
- []
16+
revealjs:
17+
ensureFileRegexMatches:
18+
-
19+
- '<img src="_extensions(/|\\)my-brand(/|\\)sun-face\.png" alt="sun face".*>'
20+
-
21+
- 'moon-face'
22+
typst:
23+
ensureTypstFileRegexMatches:
24+
-
25+
- 'background: align\(left\+top, box\(inset: 0.75in, image\("_extensions(/|\\\\)my-brand(/|\\\\)sun-face.png", width: 1\.5in, alt: "sun face"\)\)'
26+
-
27+
- 'image.*moon-face'
28+
---
29+
30+
# brand.yml extension
31+
32+
Here is some inline code `def foo(x): return x`{.python} and `y`{.python} and `z`{.python}.
33+
34+
35+
{{< lipsum 1 >}}
36+
37+
```{.python}
38+
# | echo: true
39+
print(1+2)
40+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.quarto/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title: Typst-brand-typography-example
2+
author: Gordon Woodhull
3+
version: 1.0.0
4+
quarto-required: ">=99.9.0"
5+
contributes:
6+
metadata:
7+
project:
8+
brand: brand.yml
9+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
typography:
2+
fonts:
3+
- family: "Open Sans"
4+
source: file
5+
files:
6+
- resources/fonts/opensans/OpenSans-VariableFont_wdth,wght.ttf
7+
- family: "Fira Code"
8+
source: file
9+
files:
10+
- resources/fonts/firacode/FiraCode-VF.ttf
11+
- family: "Roboto Slab"
12+
source: file
13+
files:
14+
- path: resources/fonts/robotoslab/RobotoSlab-VariableFont_wght.ttf
15+
weight: 600
16+
style: normal
17+
base:
18+
family: Open Sans
19+
line-height: 1.25em
20+
size: 1rem
21+
headings:
22+
family: Roboto Slab
23+
color: primary
24+
weight: 600
25+
monospace:
26+
family: Fira Code
27+
size: 0.9em

0 commit comments

Comments
 (0)