Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.quarto/
**/*.quarto_ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
project:
title: "Project"
type: website
format:
html:
template-partials:
- metadata.html
10 changes: 10 additions & 0 deletions tests/docs/smoke-all/issues/7318-title-no-overwrite/document1.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Document 1"
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['<title>This text will be overwritten.</title>']
---

This is sample document 1.
18 changes: 18 additions & 0 deletions tests/docs/smoke-all/issues/7318-title-no-overwrite/document2.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "Document 2"
format:
html:
template-partials:
- metadata.html
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['<title>This text will be overwritten.</title>']
---

This is sample document 2.

The `format` metadata is redundant with that in `_quarto.yml`,
but it's here to show that if you remove those options from `_quarto.yml`
but leave them here, the bug will remain the same.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['<title>This text will be overwritten.</title>']
---

This is sample document 3, and this one actually works correctly!
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<title>This text will be overwritten.</title>
<!-- I'm not actually trying to have two titles; this just shows the issue more clearly. -->
<!-- Also, these comments show that the rest of this file's contents will be copied over faithfully. -->
2 changes: 2 additions & 0 deletions tests/docs/smoke-all/website/title-shortcode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.quarto/
**/*.quarto_ipynb
14 changes: 14 additions & 0 deletions tests/docs/smoke-all/website/title-shortcode/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
project:
type: website

website:
title: "shortcode in title"
navbar:
left:
- href: index.qmd
text: Home
- about.qmd

format: html

custom-title-about: "YOLO"
10 changes: 10 additions & 0 deletions tests/docs/smoke-all/website/title-shortcode/about.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "{{< meta custom-title-about >}} Page"
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['<title>YOLO Page – shortcode in title</title>']
---

This page should have shortcode in title resolved from the `_quarto.yml` metadata.
10 changes: 10 additions & 0 deletions tests/docs/smoke-all/website/title-shortcode/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "shortcode in title"
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['<title>shortcode in title</title>']
---

Title is same as website title, and should not be repeated.
Loading