@fy-/fws-vue 0.6.0 → 0.6.1
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 +7 -6
- 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
|
-
["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"],
|
|
@@ -105,7 +105,12 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
105
105
|
metaPairs.forEach(([seoKey, ...properties]) => {
|
|
106
106
|
properties.forEach((property) => {
|
|
107
107
|
if (seo.value[seoKey as keyof LazyHead]) {
|
|
108
|
-
|
|
108
|
+
console.log("property", property);
|
|
109
|
+
if (
|
|
110
|
+
property === "description" ||
|
|
111
|
+
property === "keywords" ||
|
|
112
|
+
property.startsWith("twitter")
|
|
113
|
+
) {
|
|
109
114
|
metas.push({
|
|
110
115
|
name: property,
|
|
111
116
|
content: seo.value[seoKey as keyof LazyHead],
|
|
@@ -120,10 +125,6 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
120
125
|
});
|
|
121
126
|
});
|
|
122
127
|
|
|
123
|
-
if (seo.value.description) {
|
|
124
|
-
metas.push({ name: "description", content: seo.value.description });
|
|
125
|
-
}
|
|
126
|
-
|
|
127
128
|
return metas;
|
|
128
129
|
}),
|
|
129
130
|
});
|