@fy-/fws-vue 2.0.51 → 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 -30
- 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,36 +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
|
-
if (seoData.value.image) {
|
|
121
|
-
if (seoData.value.image.includes("?vars=")) {
|
|
122
|
-
if (seoData.value.imageType) {
|
|
123
|
-
return seoData.value.image.replace(
|
|
124
|
-
"?vars=",
|
|
125
|
-
`.${seoData.value.imageType.replace("image/", "")}?vars=`,
|
|
126
|
-
);
|
|
127
|
-
} else {
|
|
128
|
-
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return seoData.value.image;
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
ogImageUrl: () => {
|
|
135
|
-
if (seoData.value.image) {
|
|
136
|
-
if (seoData.value.image.includes("?vars=")) {
|
|
137
|
-
if (seoData.value.imageType) {
|
|
138
|
-
return seoData.value.image.replace(
|
|
139
|
-
"?vars=",
|
|
140
|
-
`.${seoData.value.imageType.replace("image/", "")}?vars=`,
|
|
141
|
-
);
|
|
142
|
-
} else {
|
|
143
|
-
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return seoData.value.image;
|
|
147
|
-
}
|
|
148
|
-
},
|
|
126
|
+
|
|
149
127
|
ogImageType: () => {
|
|
150
128
|
if (seoData.value.imageType) {
|
|
151
129
|
return seoData.value.imageType
|