Skip to content

fix: Use clean page titles for JSON-LD headlines - #33573

Merged
mvvmm merged 5 commits into
productionfrom
aeo-clean-jsonld-headlines
Sep 22, 2026
Merged

mvvmm merged 5 commits into
productionfrom
aeo-clean-jsonld-headlines

Conversation

@mvvmm

@mvvmm mvvmm commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Use the clean page title for the JSON-LD headline instead 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: title overrides 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. The headline is now the frontmatter title — the same value the page renders as its visible <h1> — keeping structured data consistent with on-page content.

For /workers/get-started/guide/:

"headline": "Get started - CLI · Cloudflare Workers docs"

becomes:

"headline": "CLI"

The same derivation removes section/product suffixes from <title> overrides elsewhere, e.g. Performance · Use cases → Performance on the use-cases landing pages and Plans — 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.ts
  • pnpm run check
  • pnpm run lint
  • pnpm run format:core:check
  • pnpm run test

Documentation checklist

pranavsekhar and others added 3 commits September 21, 2026 11:54
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).
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://aeo-clean-jsonld-headlines.previews.developers.cloudflare.com (commit d4f7e21)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5be36e50.previews.developers.cloudflare.com d4f7e21 2026-09-21T20:04:59.260Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://bf47a3df.previews.developers.cloudflare.com 0e96aba 2026-09-21T17:08:52.697Z Visit the dashboard ↗

@mvvmm
mvvmm marked this pull request as ready for review September 21, 2026 19:28
@mvvmm
mvvmm requested review from a team as code owners September 21, 2026 19:28
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review

✅ No issues found in commit d4f7e21.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

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.
@mvvmm

mvvmm commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

closes #33509

@mvvmm
mvvmm merged commit 70e08ea into production Sep 22, 2026
18 checks passed
@mvvmm
mvvmm deleted the aeo-clean-jsonld-headlines branch September 22, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants