Repository navigation
Fix page-level website option validation and social metadata opt-out - #15091
Merged
Merged
Conversation
Website pages read bread-crumbs, back-to-top-navigation, page-navigation, margin-header and margin-footer from their own front matter, and the quarto-web docs show bread-crumbs, back-to-top-navigation and page-navigation set per page. The document schema only declared them under `website:`, so a page value of the wrong type passed validation silently and editors offered no completion for them. Declare all five in the document schema with the same types as their `website:` counterparts. Descriptions follow the page-level behavior: the three booleans only opt a page out (page-navigation: true also opts in), and page margin headers and footers are added after the site ones.
With `open-graph: true` or `twitter-card: true` under `website:`, a page setting the same option to `false` (in its front matter or in a `_metadata.yml`) still got og: or twitter: tags. The provider loop skipped a provider only when both the page and site values were falsy, and the merge of site and page options treats a page `false` like an unset value, so the site value won. A page `false` now skips the provider, as a page `false` already does for page-navigation, bread-crumbs, back-to-top-navigation and search. An empty page value (`open-graph:` with nothing after it) still falls back to the site settings. The page-level schema descriptions now mention `false`.
The changelog says `open-graph: false` also works from `_metadata.yml`, and the opt-out of one provider must leave the other enabled. Neither was covered: the existing fixture sets both options to false in page front matter.
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. |
cderv
added a commit
to quarto-dev/quarto-web
that referenced
this pull request
Oct 16, 2026
From Quarto 1.11 (quarto-dev/quarto-cli#15091), `open-graph: false` or `twitter-card: false` in a page or a `_metadata.yml` omits that metadata when the website enables it. The page only described merging page and site metadata, so the opt-out was not discoverable.
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.
Website pages read several
websiteoptions from their own front matter, but the document schema did not declare some of them, and a pageopen-graph: falsedid not opt the page out. Follow-up to #15084, which did the same declaration work for page-levelopen-graphandtwitter-card.Page-level navigation options
bread-crumbs,back-to-top-navigation,page-navigation,margin-headerandmargin-footerare read from page front matter, and the website navigation docs show the first three set per page. They were only declared underwebsite:, so a page value of the wrong type passed validation silently and editors offered no completion.They are now declared in
document-website.ymlwith the same types as theirwebsite:counterparts. Descriptions follow the page-level behavior: the three booleans only opt a page out (page-navigation: truealso opts in), and page margin headers and footers are added after the site ones.Social metadata opt-out
With
open-graph: trueortwitter-card: trueunderwebsite:, a page setting the same option tofalse, in its front matter or in a_metadata.yml, still gotog:ortwitter:tags. The provider loop inwebsite-meta.tsskipped a provider only when both the page and site values were falsy, and the merge of site and page options treats a pagefalselike an unset value, so the site value won.A page
falsenow skips the provider, as a pagefalsealready does forpage-navigation,bread-crumbs,back-to-top-navigationandsearch. An empty page value (open-graph:with nothing after it) still falls back to the site settings.Documentation of the page opt-out: quarto-dev/quarto-web#2297
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.