Skip to content

Commit 20509aa

Browse files
authored
Cover every social meta tag in the og:site_name tests (#15112)
The website meta markdown pipeline rewrites the content of five tags after rendering: og:title, twitter:title, og:site_name, og:description and twitter:description. Each rewrite must touch only the tag Quarto wrote, never a same-named tag the page added itself. The opt-out fixture had decoys for only three of the names, so a regression in the description handler would have gone unnoticed. It now has a decoy for each of the five, and about.qmd asserts that Quarto's own description and twitter:title tags still get their rendered values next to the decoys. The existing fixtures all use plain-string site names, where the value written into og:site_name already equals the rendered text. Dropping the og:site_name rewrite from the site title handler left them all passing. markdown-site-name.qmd uses a site-name with Markdown and a shortcode, so the tag only gets the expected plain text if the rendered value is written back.
1 parent 4c7b5d2 commit 20509aa

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎tests/docs/smoke-all/2026/10/19/issue-14917/about.qmd‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ _quarto:
2323
- 'meta[name="twitter:title"][content="DECOY TITLE"]'
2424
- 'meta[name="twitter:description"][content="DECOY DESCRIPTION"]'
2525
- 'meta[property="og:title"][content^="About"]'
26+
- 'meta[property="og:description"][content="About page description"]'
27+
- 'meta[name="twitter:title"][content^="About"]'
2628
- 'meta[name="twitter:description"][content="About page description"]'
2729
- ['meta[property="og:site_name"][content="SITE TITLE"]']
2830
---
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "Summary"
3+
open-graph:
4+
site-name: "**Bold** {{< meta title >}} name"
5+
_quarto:
6+
tests:
7+
html:
8+
ensureHtmlElements:
9+
- ['meta[property="og:site_name"][content="Bold Summary name"]']
10+
---
11+
12+
An explicit `open-graph.site-name` containing Markdown and a shortcode must reach `og:site_name` as rendered plain text.

‎tests/docs/smoke-all/2026/10/19/issue-14917/opt-out.qmd‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ format:
99
<meta property="og:site_name" content="PAGE SITE NAME">
1010
<meta property="og:title" content="PAGE TITLE">
1111
<meta name="twitter:title" content="PAGE TITLE">
12+
<meta property="og:description" content="PAGE DESCRIPTION">
13+
<meta name="twitter:description" content="PAGE DESCRIPTION">
1214
_quarto:
1315
tests:
1416
html:
1517
ensureHtmlElements:
1618
- - 'meta[property="og:site_name"][content="PAGE SITE NAME"]'
1719
- 'meta[property="og:title"][content="PAGE TITLE"]'
1820
- 'meta[name="twitter:title"][content="PAGE TITLE"]'
21+
- 'meta[property="og:description"][content="PAGE DESCRIPTION"]'
22+
- 'meta[name="twitter:description"][content="PAGE DESCRIPTION"]'
1923
- ['meta[property="og:site_name"][content="SITE TITLE"]']
2024
---
2125

0 commit comments

Comments
 (0)