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
Copy file name to clipboardExpand all lines: docs/content/docs/02.guide/90.migrating.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ definePageMeta({
28
28
</script>
29
29
```
30
30
31
+
### Experimental strict SEO mode
32
+
We have added a new experimental option `strictSeo`{lang="yml"} that enables strict SEO mode, which changes the way i18n head tags are handled.
33
+
34
+
With strict SEO mode enabled, the i18n head tags are managed internally, this allows for some much requested improvements:
35
+
* The module will no longer add alternate tags for unsupported locales when setting localized dynamic route params.
36
+
* Unsupported locale links used with `<SwitchLocalePathLink>`{lang="vue"} are disabled, their links will be set to `'#'`{lang="ts"} and will have a `data-i18n-disabled`{lang="vue"} attribute for styling purposes.
37
+
* The `useLocaleHead()`{lang="ts"} is no longer needed in strict SEO mode, i18n tags are automatically set by the module and usage will throw an error.
38
+
* Canonical query parameters are configured globally with `experimental.strictSeo.canonicalQueryParams`{lang="yml"}.
39
+
* The `useSetI18nParams()`{lang="ts"} inherits the global canonical query parameter config which can be overridden through its options parameter.
40
+
41
+
If this mode proves stable it will become the default in v11, please try it out and report any issues you encounter.
31
42
32
43
### Lazy loading
33
44
The `lazy` option has been removed and lazy loading of locale messages is now the default behavior.
@@ -36,8 +47,8 @@ The `lazy` option has been removed and lazy loading of locale messages is now th
36
47
The function signature for `finalizePendingLocaleChange()`{lang="ts"} has been corrected from `() => Promise<void>`{lang="ts-type"} to `() => void`{lang="ts-type"}.
37
48
This change was made since the function does not rely on any async operations and should not be awaited, and should prevent unnecessary function coloring.
38
49
39
-
### Default arguments changed `useLocaleHead()`{lang="ts"} and `$localeHead()`{lang="ts"}
40
-
The default value for the `key` property has been changed from `'hid'` to `'key'`.
50
+
### Arguments changed `useLocaleHead()`{lang="ts"} and `$localeHead()`{lang="ts"}
51
+
The `key` property has been removed and can no longer be configured, this is necessary for predictable and consistent localized head tag management.
41
52
42
53
### `restructureDir` migration path removed
43
54
To ease migration in v9 it was possible to disable the new directory structure by setting `restructureDir: false`, this has now been removed and we recommend using the default value of `'i18n'`.
0 commit comments