Repository navigation
feat(game): BreadcrumbList structured data on the guide pages - #267
Merged
Merged
Conversation
Each guide (/rules, /strategy, /opening-moves, /starting-positions) emits one BreadcrumbList: home, then the page, with absolute URLs equal to the page's own canonical. Translated guides carry it in their language; home, the offline game and the online landing carry none.
Owner
Author
|
Schema.org validator (validator.schema.org, code-snippet mode, JSON-LD taken from
Pasted JSON for {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Abalone","item":"https://abalone.tudu.dev/pt"},{"@type":"ListItem","position":2,"name":"Regras","item":"https://abalone.tudu.dev/pt/rules"}]} |
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.
What
Search results can show the page path (Abalone > Rules) instead of a bare URL. Each guide page now emits one
BreadcrumbListJSON-LD script:/rules,/strategy,/opening-moves,/starting-positionsAbalone, absolute URL of the home page in the page's language), item 2: the page (the header's own label, absolute URL equal to the page's canonical)/rulesand/strategyare translated, so their 12 locale variants carry the trail in their language (Regras,Strategie, ...) on their own/xx/...canonical. The other JSON-LD stays English-only, as before./opening-movesand/starting-positionsexist in English only: their/xx/...URLs serve the English page with the English canonical, so the trail names that canonical./offlineand/play-onlineemit none.Verification
structured-data.test.ts: item count, positions 1 and 2, absolute URLs, URL equals canonical for every language of every guide, localized names, none on the other pages, no raw<in any script.e2e/structured-data.spec.ts(chromium) andlocale-urls.spec.tspass; the served HTML carries one trail per guide.pnpm typecheck,pnpm biome:check,pnpm --filter @repo/game test, scoped game build: green.