From 0ae8bc4a7e0638e38ffd2620239d554171a95f18 Mon Sep 17 00:00:00 2001 From: Dario Ferderber Date: Wed, 3 May 2023 21:51:28 +0200 Subject: [PATCH 01/12] docs: add useSeoMeta --- docs/3.api/1.composables/use-seo-meta.md | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/3.api/1.composables/use-seo-meta.md diff --git a/docs/3.api/1.composables/use-seo-meta.md b/docs/3.api/1.composables/use-seo-meta.md new file mode 100644 index 000000000000..cb8edac5bbc6 --- /dev/null +++ b/docs/3.api/1.composables/use-seo-meta.md @@ -0,0 +1,44 @@ +--- +description: The useSeoMeta composable lets you define your sites SEO Meta as a flat object with full TypeScript support +--- + +# `useSeoMeta` + +The `useSeoMeta` composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. + +This helps you avoid common mistakes, such as using `name` instead of `property` as well typos with over 100+ meta tags fully typed. + +This is the recommended way to add meta tags to your site as it is XSS safe and has full TypeScript support. +:ReadMore{link="/docs/getting-started/seo-meta"} + +**Simple example:** + +```vue [app.vue] + +``` + +**Reactive example:** + +When inserting tags that are reactive, you should use the computed getter syntax (`() => value`): + +```vue [app.vue] + +``` + +Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) composable. \ No newline at end of file From f8765be61afda8665c49189191c0e578994aa3c7 Mon Sep 17 00:00:00 2001 From: Dario Ferderber Date: Wed, 3 May 2023 21:52:05 +0200 Subject: [PATCH 02/12] docs: style - single quotes --- docs/3.api/3.utils/$fetch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.api/3.utils/$fetch.md b/docs/3.api/3.utils/$fetch.md index 180a2a868c83..badfe082f65f 100644 --- a/docs/3.api/3.utils/$fetch.md +++ b/docs/3.api/3.utils/$fetch.md @@ -16,7 +16,7 @@ We recommend to use [`useFetch`](https://nuxt.com/docs/api/composables/use-fetch ```vue ``` -**Reactive example:** - -When inserting tags that are reactive, you should use the computed getter syntax (`() => value`): - -```vue [app.vue] - -``` - -Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) composable. +Read more on the [`useSeoMeta`](/docs/api/composables/use-seo-meta) composable. ## Components diff --git a/docs/3.api/1.composables/use-seo-meta.md b/docs/3.api/1.composables/use-seo-meta.md index d1993af451b4..79801d9c1199 100644 --- a/docs/3.api/1.composables/use-seo-meta.md +++ b/docs/3.api/1.composables/use-seo-meta.md @@ -11,11 +11,11 @@ This helps you avoid common mistakes, such as using `name` instead of `property` This is the recommended way to add meta tags to your site as it is XSS safe and has full TypeScript support. :ReadMore{link="/docs/getting-started/seo-meta"} -**Simple example:** +## Example ```vue [app.vue] ``` -**Reactive example:** - When inserting tags that are reactive, you should use the computed getter syntax (`() => value`): ```vue [app.vue] @@ -41,4 +39,14 @@ useSeoMeta({ ``` -Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) composable. \ No newline at end of file +## Parameters +There are over 100+ parameters. + +Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) + +# `useServerSeoMeta` + +In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. +Parameters are exactly the same as with `useSeoMeta` + +Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) and [`useServerSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta#useserverseometa) composable. \ No newline at end of file From 8aa39388413380376c66a7622209d70a52bed96f Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 5 May 2023 10:59:24 +0000 Subject: [PATCH 08/12] [autofix.ci] apply automated fixes --- docs/3.api/1.composables/use-seo-meta.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/3.api/1.composables/use-seo-meta.md b/docs/3.api/1.composables/use-seo-meta.md index 79801d9c1199..c213828099bc 100644 --- a/docs/3.api/1.composables/use-seo-meta.md +++ b/docs/3.api/1.composables/use-seo-meta.md @@ -40,6 +40,7 @@ useSeoMeta({ ``` ## Parameters + There are over 100+ parameters. Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) @@ -49,4 +50,4 @@ Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/met In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. Parameters are exactly the same as with `useSeoMeta` -Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) and [`useServerSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta#useserverseometa) composable. \ No newline at end of file +Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) and [`useServerSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta#useserverseometa) composable. From 0bb209985e3ae98ace22c84e98eb72d49a031967 Mon Sep 17 00:00:00 2001 From: Dario Ferderber Date: Fri, 5 May 2023 13:40:50 +0200 Subject: [PATCH 09/12] docs: add useServerSeoMeta --- docs/3.api/1.composables/use-seo-meta.md | 9 +-------- docs/3.api/1.composables/use-server-seo-meta.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 docs/3.api/1.composables/use-server-seo-meta.md diff --git a/docs/3.api/1.composables/use-seo-meta.md b/docs/3.api/1.composables/use-seo-meta.md index c213828099bc..5071405c4353 100644 --- a/docs/3.api/1.composables/use-seo-meta.md +++ b/docs/3.api/1.composables/use-seo-meta.md @@ -43,11 +43,4 @@ useSeoMeta({ There are over 100+ parameters. -Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) - -# `useServerSeoMeta` - -In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. -Parameters are exactly the same as with `useSeoMeta` - -Read more on the [`useSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta) and [`useServerSeoMeta`](https://unhead.harlanzw.com/guide/composables/use-seo-meta#useserverseometa) composable. +Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) \ No newline at end of file diff --git a/docs/3.api/1.composables/use-server-seo-meta.md b/docs/3.api/1.composables/use-server-seo-meta.md new file mode 100644 index 000000000000..5f7a075b8bd3 --- /dev/null +++ b/docs/3.api/1.composables/use-server-seo-meta.md @@ -0,0 +1,11 @@ +--- +description: The useServerSeoMeta composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. +--- + +# `useServerSeoMeta` + +Just like `useSeoMeta`, `useServerSeoMeta` composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. +:ReadMore{link="/docs/api/composables/use-seo-meta"} + +In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. +Parameters are exactly the same as with [`useSeoMeta`](/docs/api/composables/use-seo-meta) \ No newline at end of file From d0443f3621b82cd02d8586e2704f9011705a07cf Mon Sep 17 00:00:00 2001 From: Dario Ferderber Date: Fri, 5 May 2023 13:45:41 +0200 Subject: [PATCH 10/12] docs: link useSeoMeta --- docs/3.api/1.composables/use-server-seo-meta.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/3.api/1.composables/use-server-seo-meta.md b/docs/3.api/1.composables/use-server-seo-meta.md index 5f7a075b8bd3..9f4e3a0645fc 100644 --- a/docs/3.api/1.composables/use-server-seo-meta.md +++ b/docs/3.api/1.composables/use-server-seo-meta.md @@ -4,7 +4,7 @@ description: The useServerSeoMeta composable lets you define your site's SEO met # `useServerSeoMeta` -Just like `useSeoMeta`, `useServerSeoMeta` composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. +Just like [`useSeoMeta`](/docs/api/composables/use-seo-meta), `useServerSeoMeta` composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. :ReadMore{link="/docs/api/composables/use-seo-meta"} In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. From 02471e8f3ecef46675ec454551a7c40fbc12e3ee Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 5 May 2023 12:16:53 +0000 Subject: [PATCH 11/12] [autofix.ci] apply automated fixes --- docs/3.api/1.composables/use-seo-meta.md | 2 +- docs/3.api/1.composables/use-server-seo-meta.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/3.api/1.composables/use-seo-meta.md b/docs/3.api/1.composables/use-seo-meta.md index 5071405c4353..e03286f4b1b5 100644 --- a/docs/3.api/1.composables/use-seo-meta.md +++ b/docs/3.api/1.composables/use-seo-meta.md @@ -43,4 +43,4 @@ useSeoMeta({ There are over 100+ parameters. -Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) \ No newline at end of file +Full list of [`parameters`](https://github.com/harlan-zw/zhead/blob/main/src/metaFlat.ts) diff --git a/docs/3.api/1.composables/use-server-seo-meta.md b/docs/3.api/1.composables/use-server-seo-meta.md index 9f4e3a0645fc..146c9a6ea8ac 100644 --- a/docs/3.api/1.composables/use-server-seo-meta.md +++ b/docs/3.api/1.composables/use-server-seo-meta.md @@ -8,4 +8,4 @@ Just like [`useSeoMeta`](/docs/api/composables/use-seo-meta), `useServerSeoMeta` :ReadMore{link="/docs/api/composables/use-seo-meta"} In most instances, the meta doesn't need to be reactive as robots will only scan the initial load. So we recommend using `useServerSeoMeta` as a performance-focused utility that will not do anything (or return a `head` object) on the client. -Parameters are exactly the same as with [`useSeoMeta`](/docs/api/composables/use-seo-meta) \ No newline at end of file +Parameters are exactly the same as with [`useSeoMeta`](/docs/api/composables/use-seo-meta) From 956a618484fc3aefab58c31def30f73051cca0e2 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 5 May 2023 14:48:28 +0100 Subject: [PATCH 12/12] docs: mention `useServerSeoMeta` as well --- docs/1.getting-started/5.seo-meta.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/1.getting-started/5.seo-meta.md b/docs/1.getting-started/5.seo-meta.md index 7b6d79646f0e..5f057b65b563 100644 --- a/docs/1.getting-started/5.seo-meta.md +++ b/docs/1.getting-started/5.seo-meta.md @@ -57,9 +57,9 @@ useHead({ We recommend to take a look at the [`useHead`](/docs/api/composables/use-head) and [`useHeadSafe`](/docs/api/composables/use-head-safe) composables. -## `useSeoMeta` +## `useSeoMeta` and `useServerSeoMeta` -The `useSeoMeta` composable lets you define your site's SEO meta tags as a flat object with full TypeScript support. +The `useSeoMeta` and `useServerSeoMeta` composables let you define your site's SEO meta tags as a flat object with full TypeScript support. This helps you avoid typos and common mistakes, such as using `name` instead of `property`. @@ -76,7 +76,7 @@ useSeoMeta({ ``` -Read more on the [`useSeoMeta`](/docs/api/composables/use-seo-meta) composable. +Read more on the [`useSeoMeta`](/docs/api/composables/use-seo-meta) and [`useServerSeoMeta`](/docs/api/composables/use-server-seo-meta) composables. ## Components