Skip to content

Fix page-level website option validation and social metadata opt-out - #15091

Merged
cderv merged 5 commits into
mainfrom
fix-page-level-website-options
Oct 16, 2026
Merged

cderv merged 5 commits into
mainfrom
fix-page-level-website-options

Conversation

@cderv

@cderv cderv commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Website pages read several website options from their own front matter, but the document schema did not declare some of them, and a page open-graph: false did not opt the page out. Follow-up to #15084, which did the same declaration work for page-level open-graph and twitter-card.

Page-level navigation options

bread-crumbs, back-to-top-navigation, page-navigation, margin-header and margin-footer are read from page front matter, and the website navigation docs show the first three set per page. They were only declared under website:, so a page value of the wrong type passed validation silently and editors offered no completion.

They are now declared in document-website.yml 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.

Social metadata opt-out

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 in website-meta.ts 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.

Documentation of the page opt-out: quarto-dev/quarto-web#2297

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.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

cderv added 4 commits October 16, 2026 14:45
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.
@posit-snyk-bot

posit-snyk-bot commented Oct 16, 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 45cc599 into main Oct 16, 2026
51 checks passed
@cderv
cderv deleted the fix-page-level-website-options branch October 16, 2026 18:40
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.
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