Repository navigation
Stop repeating the site name in the root page title - #4982
Merged
Merged
Conversation
The root page of elastic.co/docs rendered "Elastic Docs | Elastic Docs" because its H1 equals the docset's navigation title. `PageTitleResolver` now leaves the suffix off when the two match. Co-Authored-By: Claude Opus 5.5 <[email protected]>
akira28
approved these changes
Nov 20, 2026
…view by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…vault-gh-plugin-prod) The isolated home journey expects the new single title. The prod monitor checks the home page's first link instead, because the deployed title changes only when the site is rebuilt. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng (per review by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Opus 5.5 <[email protected]>
| wait --load networkidle | ||
| expect title "Elastic Docs | Elastic Docs" | ||
| # The home page title changes from "Elastic Docs | Elastic Docs" to "Elastic Docs" when the site is rebuilt, so check its first link instead. | ||
| expect visible find role link --name "Elastic Fundamentals" |
There was a problem hiding this comment.
Severity: P3 (Low)
Checking the link that the next step already clicks removes the assembled home page’s title check entirely. The smoke journey will now pass even if /docs/ ships an empty or unrelated title. Match either the old or the new title during rollout rather than dropping the assertion.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4982/ Sample changed pages: |
The preview check failed because the root page now has the title `Elastic Docs`. The journey also runs as a monitor against prod, staging and edge, which keep the old title until each site is rebuilt, so the anchored regex accepts both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The HTML title of a docset's root page no longer repeats the site name. On elastic.co/docs, the title changes from
Elastic Docs | Elastic DocstoElastic Docs.Affects: Authoring, Assembler builds, Isolated builds
Prompt summary: The author asks why the root of elastic.co/docs has the title
Elastic Docs | Elastic Docs, and then asks for a fix.Why
PageTitleResolveralways builds the title as{meta_title or H1} | {site name}. The site name is the docset's root navigation title. The root page ofdocs-contenthas the H1Elastic Docs, and the navigation title is alsoElastic Docs, so the two halves are the same string. Browser tabs, search results and link previews all show the doubled title.What
Title suffix
PageTitleResolver.Resolveleaves off| {site name}when the page title equals the site name, ignoring case. All other pages keep the suffix. The change applies to<title>andog:title, which both read the same value.Tests and journeys
Three tests in
PageTitleTestsexpected the doubled form, because each fixture's only page is also the docset root. They now expect the plain title. A new test covers a title that differs from the site name only in case. Themeta_titletest still covers a title that differs from the site name.landing/home.journeyexpectsdocs-builder.navigation/synth/main-paths.journeychecks the home page's first link instead of its title, because it runs against prod and the deployed title changes only when the site is rebuilt. The Syntheticsnavigation-test.journey.tsaccepts bothElastic DocsandElastic Docs | Elastic Docson the home page, because its monitors run against sites that are not rebuilt yet.Authoring docs
docs/syntax/titles.mdanddocs/syntax/frontmatter.mdexplain that the builder leaves off the site name when the title matches it.Verify
Check on the preview
docs-builder, with no repeated suffix.Syntax guide | docs-builder.🤖 Generated with Claude Code