Skip to content

Commit d6e1634

Browse files
committed
Add test for shortcode resolution in title
Check also we do not duplicate website title
1 parent ec1bda3 commit d6e1634

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.quarto/
2+
**/*.quarto_ipynb
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "shortcode in title"
6+
navbar:
7+
left:
8+
- href: index.qmd
9+
text: Home
10+
- about.qmd
11+
12+
format: html
13+
14+
custom-title-about: "YOLO"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "{{< meta custom-title-about >}} Page"
3+
_quarto:
4+
tests:
5+
html:
6+
ensureFileRegexMatches:
7+
- ['<title>YOLO Page – shortcode in title</title>']
8+
---
9+
10+
This page should have shortcode in title resolved from the `_quarto.yml` metadata.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "shortcode in title"
3+
_quarto:
4+
tests:
5+
html:
6+
ensureFileRegexMatches:
7+
- ['<title>shortcode in title</title>']
8+
---
9+
10+
Title is same as website title, and should not be repeated.

0 commit comments

Comments
 (0)