Repository navigation
fix(seo): fall back to the localised default description - #475
Merged
Merged
Conversation
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
Deploying with
|
| 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 |
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.
Problem
usePageSeofell back to the static Englishsite.descriptionbefore the localisedseo.default_descriptionkey. 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-orgreadssiteConfig.description) and the og defaults, so those stayed English on every locale.The Organization schema description lives in
nuxt.config.tsschemaOrg.identityas one static node. nuxt-schema-org has no per-locale identity, so it is not localised here.Change
usePageSeo: description order is nowopts.description, thent('seo.default_description'), thensite.descriptionas last resort.i18n/locales/{de,en}.json: addnuxtSiteConfig.description.nuxt-site-configreads this key per locale (i18n.techeck), souseSiteConfig().description, WebSite and og defaults follow the locale.nuxt.config.ts: comment naming the key, so theunused-keysspec sees it referenced.Tests
tests/seo/default-description.spec.ts(Nuxt environment, written before the fix):nuxtSiteConfig.descriptioninde.jsonis the German default (red before the fix).Verification
pnpm test: 165 files, 1294 tests passedpnpm quality: ESLint errors 186, TypeScript errors 3, equal to baselinepnpm build: passeshttps://claude.ai/code/session_019zws4ceJu2jctk3XT48fMX