Skip to content

feat(game): BreadcrumbList structured data on the guide pages - #267

Merged
arrzdev merged 1 commit into
mainfrom
feat/breadcrumb-structured-data
Nov 2, 2026
Merged

arrzdev merged 1 commit into
mainfrom
feat/breadcrumb-structured-data

Conversation

@arrzdev

@arrzdev arrzdev commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What

Search results can show the page path (Abalone > Rules) instead of a bare URL. Each guide page now emits one BreadcrumbList JSON-LD script:

  • /rules, /strategy, /opening-moves, /starting-positions
  • item 1: home (Abalone, 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)
  • /rules and /strategy are 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-moves and /starting-positions exist in English only: their /xx/... URLs serve the English page with the English canonical, so the trail names that canonical.
  • Home, /offline and /play-online emit 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) and locale-urls.spec.ts pass; the served HTML carries one trail per guide.
  • pnpm typecheck, pnpm biome:check, pnpm --filter @repo/game test, scoped game build: green.
  • Schema.org validator: see the PR comment.

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

arrzdev commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Schema.org validator (validator.schema.org, code-snippet mode, JSON-LD taken from seoPageHead output, 2026-11-02):

Page Result
English /rules BreadcrumbList, 0 errors, 0 warnings
Portuguese /pt/rules BreadcrumbList, 0 errors, 0 warnings
English /starting-positions BreadcrumbList, 0 errors, 0 warnings

Pasted JSON for /pt/rules:

{"@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"}]}

@arrzdev
arrzdev merged commit 686d694 into main Nov 2, 2026
5 checks passed
@arrzdev
arrzdev deleted the feat/breadcrumb-structured-data branch November 2, 2026 07:12
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.

1 participant