Repository navigation
Cover all social meta tags in og:site_name tests - #15112
Merged
Merged
Conversation
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.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #15102, which fixed
og:site_nameand 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:descriptionandtwitter:description. The tests now cover each of them:opt-out.qmdturns 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.qmdhad decoys for all five names but checked Quarto's own value only forog:titleandtwitter:description. It now also checksog:descriptionandtwitter: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_nameupdate fromsiteTitleMetaHandlerleft every one of them passing. The newmarkdown-site-name.qmdsetssite-name: "**Bold** {{< meta title >}} name"and expectsBold Summary name, and it fails without that update.Test-only change, so no changelog entry.
Related to #14917
Checklist
I have (if applicable):
AI-assisted PR