You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(seo): emit hreflang from iso, not routing code
One alternate per locale (iso || code); optional
hreflangBaseLanguage claims bare language by list order (#243).
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: docs/api/module-options.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,7 @@ Parts of the module you can switch off.
123
123
124
124
| Option | Type | Default | Description |
125
125
| --- | --- | --- | --- |
126
+
|`hreflangBaseLanguage`|`boolean`|`false`| Also emit a bare-language `hreflang` derived from each locale's `iso` (e.g. `es-ES` → also `es`). The first regional locale in `locales` claims the bare tag for that language. Routing `code` is never used — only `iso \|\| code`. |
126
127
|`localizedRouteNamePrefix`|`string`|`'localized-'`| Prefix prepended to localized route names (e.g. `'localized-index'`). Used internally to distinguish original routes from generated locale variants. |
127
128
|`routeDisableMeta`|`Record<string, boolean \| string[]>`| — | Per-route meta tag disabling, extracted from `defineI18nRoute()` calls. Maps a route path to `true` (disable all meta) or an array of locale codes for which meta should be disabled. |
128
129
|`missingWarn`|`boolean`|`true`| Show console warnings when a translation key is missing. |
|`HreflangLocaleInput`| type |``Pick<Locale, 'code' \| 'iso'> & { /** When true and `hreflangBaseLanguage` is on, this locale claims the bare language tag even if another locale already did. */ isCatchallLocale?: boolean }``|
383
+
|`resolveHreflangAlternates`| function |`(locales: HreflangLocaleInput[], options?: ResolveHreflangAlternatesOptions) => HreflangAlternate[]`|
384
+
|`ResolveHreflangAlternatesOptions`| interface | 1 members |
0 commit comments