@dargmuesli/nuxt-vio 11.0.0-beta.2 → 11.0.0-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/composables/useHeadDefault.ts +19 -20
- package/package.json +5 -5
- package/utils/constants.ts +1 -1
@@ -1,27 +1,26 @@
|
|
1
|
-
import { defu } from 'defu'
|
2
1
|
import type { UseSeoMetaInput } from '@unhead/vue'
|
3
2
|
|
4
|
-
export const useHeadDefault = ({
|
5
|
-
extension,
|
6
|
-
title,
|
7
|
-
}: {
|
8
|
-
extension?: UseSeoMetaInput
|
9
|
-
title: string | ComputedRef<string>
|
10
|
-
}) => {
|
3
|
+
export const useHeadDefault = (input: UseSeoMetaInput) => {
|
11
4
|
const siteConfig = useSiteConfig()
|
12
5
|
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
title,
|
17
|
-
twitterDescription: siteConfig.description,
|
18
|
-
twitterTitle: ref(
|
19
|
-
TITLE_TEMPLATE({
|
6
|
+
const description = input.description || siteConfig.description
|
7
|
+
const title = input.title
|
8
|
+
? TITLE_TEMPLATE({
|
20
9
|
siteName: siteConfig.name,
|
21
|
-
title:
|
22
|
-
})
|
23
|
-
|
24
|
-
}
|
10
|
+
title: input.title.toString(),
|
11
|
+
})
|
12
|
+
: siteConfig.name
|
25
13
|
|
26
|
-
useServerSeoMeta(
|
14
|
+
useServerSeoMeta({
|
15
|
+
...(description
|
16
|
+
? {
|
17
|
+
description,
|
18
|
+
ogDescription: description,
|
19
|
+
twitterDescription: description,
|
20
|
+
}
|
21
|
+
: {}),
|
22
|
+
msapplicationConfig: `/assets/static/favicon/browserconfig.xml?v=${CACHE_VERSION}`,
|
23
|
+
...(title ? { title, ogTitle: title, twitterTitle: title } : {}),
|
24
|
+
...input,
|
25
|
+
})
|
27
26
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "11.0.0-beta.
|
3
|
+
"version": "11.0.0-beta.4",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/dargmuesli/vio.git"
|
@@ -41,8 +41,8 @@
|
|
41
41
|
"@nuxt/image": "1.4.0",
|
42
42
|
"@nuxtjs/color-mode": "3.3.2",
|
43
43
|
"@nuxtjs/html-validator": "1.6.0",
|
44
|
-
"@nuxtjs/i18n": "8.
|
45
|
-
"@nuxtjs/seo": "2.0.0-rc.
|
44
|
+
"@nuxtjs/i18n": "8.2.0",
|
45
|
+
"@nuxtjs/seo": "2.0.0-rc.9",
|
46
46
|
"@nuxtjs/tailwindcss": "6.11.4",
|
47
47
|
"@pinia/nuxt": "0.5.1",
|
48
48
|
"@tailwindcss/forms": "0.5.7",
|
@@ -63,7 +63,7 @@
|
|
63
63
|
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.7",
|
64
64
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
65
65
|
"@playwright/test": "1.42.1",
|
66
|
-
"@unhead/vue": "1.8.
|
66
|
+
"@unhead/vue": "1.8.18",
|
67
67
|
"@urql/devtools": "2.0.3",
|
68
68
|
"@urql/exchange-graphcache": "6.5.0",
|
69
69
|
"@urql/vue": "1.1.2",
|
@@ -92,7 +92,7 @@
|
|
92
92
|
"stylelint-no-unsupported-browser-features": "8.0.1",
|
93
93
|
"tailwindcss": "3.4.1",
|
94
94
|
"ufo": "1.4.0",
|
95
|
-
"unhead": "1.8.
|
95
|
+
"unhead": "1.8.18",
|
96
96
|
"vue": "3.4.21",
|
97
97
|
"vue-router": "4.3.0",
|
98
98
|
"vue-tsc": "2.0.6"
|
package/utils/constants.ts
CHANGED
@@ -49,7 +49,7 @@ export const TITLE_TEMPLATE = ({
|
|
49
49
|
title,
|
50
50
|
}: {
|
51
51
|
siteName: string
|
52
|
-
title?: string
|
52
|
+
title?: string | null
|
53
53
|
}) => (title && title !== siteName ? `${title} · ${siteName}` : siteName)
|
54
54
|
export const VERIFICATION_FORMAT_UUID = helpers.regex(REGEX_UUID)
|
55
55
|
export const VIO_NUXT_BASE_CONFIG = ({
|