@fy-/fws-vue 0.5.6 → 0.5.7
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 +12 -5
- package/package.json +1 -1
package/composables/seo.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
92
92
|
const metaPairs = [
|
|
93
93
|
["name", "og:site_name"],
|
|
94
94
|
["title", "og:title", "twitter:title"],
|
|
95
|
-
["description", "og:description", "twitter:description"
|
|
95
|
+
["description", "og:description", "twitter:description"],
|
|
96
96
|
["published", "article:published_time"],
|
|
97
97
|
["modified", "article:modified_time"],
|
|
98
98
|
["imageWidth", "og:image:width"],
|
|
@@ -104,10 +104,17 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
104
104
|
metaPairs.forEach(([seoKey, ...properties]) => {
|
|
105
105
|
properties.forEach((property) => {
|
|
106
106
|
if (seo.value[seoKey as keyof LazyHead]) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
if (property === "description") {
|
|
108
|
+
metas.push({
|
|
109
|
+
name: property,
|
|
110
|
+
content: seo.value[seoKey as keyof LazyHead],
|
|
111
|
+
});
|
|
112
|
+
} else {
|
|
113
|
+
metas.push({
|
|
114
|
+
property,
|
|
115
|
+
content: seo.value[seoKey as keyof LazyHead] as string,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
111
118
|
}
|
|
112
119
|
});
|
|
113
120
|
});
|