@nuxt/docs-nightly 4.4.7-29652037.eb785fd0 → 4.5.0-29655888.a3f0c205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,20 +8,26 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
::warning
|
|
12
|
+
`useServerSeoMeta` is deprecated. Wrap [`useSeoMeta`](/docs/4.x/api/composables/use-seo-meta) in an `if (import.meta.server)` block instead. The auto-import is removed under `future.compatibilityVersion: 5`.
|
|
13
|
+
::
|
|
14
|
+
|
|
15
|
+
`useServerSeoMeta` lets you define your site's SEO meta tags as a flat object with full TypeScript support, exactly like [`useSeoMeta`](/docs/4.x/api/composables/use-seo-meta), but it only runs server-side and is tree-shaken from the client bundle.
|
|
12
16
|
|
|
13
17
|
:read-more{to="/docs/4.x/api/composables/use-seo-meta"}
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
For new code, use the server-only pattern directly:
|
|
16
20
|
|
|
17
21
|
```vue [app/app.vue]
|
|
18
22
|
<script setup lang="ts">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
if (import.meta.server) {
|
|
24
|
+
useSeoMeta({
|
|
25
|
+
robots: 'index, follow',
|
|
26
|
+
})
|
|
27
|
+
}
|
|
22
28
|
</script>
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
Parameters are exactly the same as with [`useSeoMeta`](/docs/4.x/api/composables/use-seo-meta)
|
|
31
|
+
Parameters are exactly the same as with [`useSeoMeta`](/docs/4.x/api/composables/use-seo-meta).
|
|
26
32
|
|
|
27
33
|
:read-more{to="/docs/4.x/getting-started/seo-meta"}
|