fix: Use clean page titles for JSON-LD headlines - #33573
Merged
Merged
Conversation
Headline overrides use inconsistent separators (" - ", " — ", " · ") that
occur inside real page titles in both orders, so splitting them is not
reliable. The frontmatter title is the visible <h1>, which keeps the
structured-data headline consistent with the page content (addresses
CR-1dc86d7a5411 from the #33509 review).
1 task
Contributor
|
Preview URL: https://d4f7e213.preview.developers.cloudflare.com |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://aeo-clean-jsonld-headlines.previews.developers.cloudflare.com (commit d4f7e21)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
mvvmm
marked this pull request as ready for review
September 21, 2026 19:28
Contributor
Review✅ No issues found in commit Code ReviewThis code review is in beta and may not always be helpful — use your judgment. No code review issues found. ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
resolvePageHeadline accepts the <title> override and documents it as deliberately ignored, so the section/product suffix tests pass real overrides and prove it is not parsed (addresses CR-669744c84224).
The override is no longer an input at all, so the headline being free of override suffixes holds by construction and the call site is guarded by TypeScript's excess-property check. Resolves the tension between CR-7564e63faba3 (tests cannot prove ignoring) and CR-6f600c2b08b2 (dead API surface): both findings dissolve with the param removed.
diogoascarneiro
approved these changes
Sep 22, 2026
MohamedH1998
approved these changes
Sep 22, 2026
Collaborator
Author
|
closes #33509 |
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.
Summary
Use the clean page title for the JSON-LD
headlineinstead of the browser<title>with its product/site suffix. The visible<title>and SEO title behavior are unchanged.Continues #33509 — its two commits are cherry-picked with credit to @pranavsekhar — and addresses the review finding there.
head: titleoverrides use inconsistent separators (|,·,—) that also occur inside real page titles in both orders (Get started - CLI,Workers RPC — Reserved Methods), so parsing the override is not reliable. Theheadlineis now the frontmattertitle— the same value the page renders as its visible<h1>— keeping structured data consistent with on-page content.For
/workers/get-started/guide/:becomes:
The same derivation removes section/product suffixes from
<title>overrides elsewhere, e.g.Performance · Use cases→Performanceon the use-cases landing pages andPlans — Cloudflare for SaaS→Plans. Pages whose<title>override was richer than the H1 now get the bare frontmatter title; improving those headlines is a frontmatter-content fix, not a parsing concern.Tests
pnpm exec vitest run src/util/page-head.node.test.tspnpm run checkpnpm run lintpnpm run format:core:checkpnpm run testDocumentation checklist