@fy-/fws-vue 2.0.3 → 2.0.5
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.
- package/composables/seo.ts +14 -12
- package/package.json +1 -1
package/composables/seo.ts
CHANGED
|
@@ -43,18 +43,21 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
if (seoData.value.
|
|
46
|
+
if (seoData.value.image) {
|
|
47
47
|
metas.push({
|
|
48
|
-
property: "og:image
|
|
49
|
-
content: seoData.value.
|
|
50
|
-
key: "og:image
|
|
48
|
+
property: "og:image",
|
|
49
|
+
content: seoData.value.image,
|
|
50
|
+
key: "og:image",
|
|
51
|
+
});
|
|
52
|
+
metas.push({
|
|
53
|
+
name: "twitter:image",
|
|
54
|
+
content: seoData.value.image,
|
|
55
|
+
key: "twitter:image",
|
|
51
56
|
});
|
|
52
|
-
}
|
|
53
|
-
if (seoData.value.imageWidth && seoData.value.image) {
|
|
54
57
|
metas.push({
|
|
55
|
-
|
|
56
|
-
content: seoData.value.
|
|
57
|
-
key: "
|
|
58
|
+
name: "image",
|
|
59
|
+
content: seoData.value.image,
|
|
60
|
+
key: "image",
|
|
58
61
|
});
|
|
59
62
|
}
|
|
60
63
|
if (seoData.value.imageType && seoData.value.image) {
|
|
@@ -119,18 +122,17 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
119
122
|
});
|
|
120
123
|
|
|
121
124
|
useSeoMeta({
|
|
122
|
-
|
|
125
|
+
ogUrl: `${getURL().Scheme}://${getURL().Host}${route.fullPath}`,
|
|
126
|
+
ogLocale: () => currentLocale,
|
|
123
127
|
robots:
|
|
124
128
|
"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
125
129
|
title: () => seoData.value.title,
|
|
126
130
|
ogTitle: () => seoData.value.title,
|
|
127
131
|
ogDescription: () => seoData.value.description,
|
|
128
|
-
ogImage: () => seoData.value.image,
|
|
129
132
|
twitterCard: "summary_large_image",
|
|
130
133
|
ogSiteName: () => seoData.value.name,
|
|
131
134
|
twitterTitle: () => seoData.value.title,
|
|
132
135
|
twitterDescription: () => seoData.value.description,
|
|
133
|
-
twitterImage: () => seoData.value.image,
|
|
134
136
|
ogImageAlt: () => {
|
|
135
137
|
if (seoData.value.image) {
|
|
136
138
|
return seoData.value.title;
|