Skip to content

Cover all social meta tags in og:site_name tests - #15112

Merged
cderv merged 1 commit into
mainfrom
fix/og-site-name-test-hardening
Oct 19, 2026
Merged

cderv merged 1 commit into
mainfrom
fix/og-site-name-test-hardening

Conversation

@cderv

@cderv cderv commented Oct 19, 2026

Copy link
Copy Markdown
Member

Follow-up to #15102, which fixed og:site_name and the meta tag updates but left gaps in its tests.

The markdown pipeline rewrites five tags after rendering: og:title, twitter:title, og:site_name, og:description and twitter:description. The tests now cover each of them:

  • opt-out.qmd turns off Quarto's social metadata and writes its own tags, but had them for only three of the five names. It now has all five, so a description handler touching tags Quarto didn't write would fail it.
  • about.qmd had decoys for all five names but checked Quarto's own value only for og:title and twitter:description. It now also checks og:description and twitter:title.

All existing fixtures use a plain-string site name, where the value written in the first pass already equals the rendered text. Removing the og:site_name update from siteTitleMetaHandler left every one of them passing. The new markdown-site-name.qmd sets site-name: "**Bold** {{< meta title >}} name" and expects Bold Summary name, and it fails without that update.

Test-only change, so no changelog entry.

Related to #14917

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

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.
@posit-snyk-bot

posit-snyk-bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit 20509aa into main Oct 19, 2026
51 checks passed
@cderv
cderv deleted the fix/og-site-name-test-hardening branch October 19, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants