Skip to content

fix(seo): fall back to the localised default description - #475

Merged
TheMeinerLP merged 1 commit into
mainfrom
fix/seo-localized-default-description
Oct 10, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
fix/seo-localized-default-description

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Collaborator

Problem

usePageSeo fell back to the static English site.description before the localised seo.default_description key. A German page without its own description would get English <title>/meta/og text. All pages pass a description today, so this is latent.

The same English value also reaches the WebSite JSON-LD (nuxt-schema-org reads siteConfig.description) and the og defaults, so those stayed English on every locale.

The Organization schema description lives in nuxt.config.ts schemaOrg.identity as one static node. nuxt-schema-org has no per-locale identity, so it is not localised here.

Change

  • usePageSeo: description order is now opts.description, then t('seo.default_description'), then site.description as last resort.
  • i18n/locales/{de,en}.json: add nuxtSiteConfig.description. nuxt-site-config reads this key per locale (i18n.te check), so useSiteConfig().description, WebSite and og defaults follow the locale.
  • nuxt.config.ts: comment naming the key, so the unused-keys spec sees it referenced.

Tests

tests/seo/default-description.spec.ts (Nuxt environment, written before the fix):

  • a German page with no description, while the static site description is overridden to English, gets the German default (red before the fix);
  • a German page with no description gets the German default (guard);
  • nuxtSiteConfig.description in de.json is the German default (red before the fix).

Verification

  • pnpm test: 165 files, 1294 tests passed
  • pnpm quality: ESLint errors 186, TypeScript errors 3, equal to baseline
  • pnpm build: passes

https://claude.ai/code/session_019zws4ceJu2jctk3XT48fMX

A page without its own description fell back to the static English
site.description before the i18n seo.default_description key, so a
German page could get English meta and og text. The WebSite schema
description and og defaults also read site.description, so they
stayed English on every locale.

usePageSeo now prefers the localised key and only then site.description.
A nuxtSiteConfig.description key per locale makes nuxt-site-config
resolve the site description per locale.

Claude-Session: https://claude.ai/code/session_019zws4ceJu2jctk3XT48fMX
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
launchpad 2d3c199 Commit Preview URL

Branch Preview URL
Oct 10 2026, 10:21 PM

@TheMeinerLP
TheMeinerLP merged commit 822cc79 into main Oct 10, 2026
8 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/seo-localized-default-description branch October 10, 2026 22:42
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