@fy-/fws-vue 2.0.52 → 2.0.54
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 +8 -32
- package/package.json +1 -1
package/composables/seo.ts
CHANGED
|
@@ -43,6 +43,13 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
43
43
|
key: "rating",
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
if (seoData.value.image) {
|
|
47
|
+
metas.push({
|
|
48
|
+
property: "og:image",
|
|
49
|
+
content: seoData.value.image,
|
|
50
|
+
key: "og:image",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
46
53
|
|
|
47
54
|
return metas;
|
|
48
55
|
},
|
|
@@ -116,38 +123,7 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
116
123
|
keywords: () => seoData.value.keywords,
|
|
117
124
|
articlePublishedTime: () => seoData.value.published,
|
|
118
125
|
articleModifiedTime: () => seoData.value.modified,
|
|
119
|
-
|
|
120
|
-
ogImageSecureUrl: () => {
|
|
121
|
-
if (seoData.value.image) {
|
|
122
|
-
if (seoData.value.image.includes("?vars=")) {
|
|
123
|
-
if (seoData.value.imageType) {
|
|
124
|
-
return seoData.value.image.replace(
|
|
125
|
-
"?vars=",
|
|
126
|
-
`.${seoData.value.imageType.replace("image/", "")}?vars=`,
|
|
127
|
-
);
|
|
128
|
-
} else {
|
|
129
|
-
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return seoData.value.image;
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
*/
|
|
136
|
-
ogImageUrl: () => {
|
|
137
|
-
if (seoData.value.image) {
|
|
138
|
-
if (seoData.value.image.includes("?vars=")) {
|
|
139
|
-
if (seoData.value.imageType) {
|
|
140
|
-
return seoData.value.image.replace(
|
|
141
|
-
"?vars=",
|
|
142
|
-
`.${seoData.value.imageType.replace("image/", "")}?vars=`,
|
|
143
|
-
);
|
|
144
|
-
} else {
|
|
145
|
-
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return seoData.value.image;
|
|
149
|
-
}
|
|
150
|
-
},
|
|
126
|
+
|
|
151
127
|
ogImageType: () => {
|
|
152
128
|
if (seoData.value.imageType) {
|
|
153
129
|
return seoData.value.imageType
|