@fy-/fws-vue 0.6.0 → 0.6.2

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.
Files changed (2) hide show
  1. package/composables/seo.ts +11 -7
  2. package/package.json +1 -1
@@ -84,6 +84,8 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
84
84
 
85
85
  if (seo.value.isAdult) {
86
86
  metas.push(
87
+ { name: "rating", content: "adult" },
88
+ { name: "RATING", content: "RTA-5042-1996-1400-1577-RTA" },
87
89
  { property: "rating", content: "adult" },
88
90
  { property: "RATING", content: "RTA-5042-1996-1400-1577-RTA" },
89
91
  );
@@ -92,7 +94,7 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
92
94
  const metaPairs = [
93
95
  ["name", "og:site_name"],
94
96
  ["title", "og:title", "twitter:title"],
95
- ["og:description", "twitter:description"],
97
+ ["description", "og:description", "twitter:description"],
96
98
  ["published", "article:published_time"],
97
99
  ["modified", "article:modified_time"],
98
100
  ["imageWidth", "og:image:width"],
@@ -104,8 +106,14 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
104
106
 
105
107
  metaPairs.forEach(([seoKey, ...properties]) => {
106
108
  properties.forEach((property) => {
107
- if (seo.value[seoKey as keyof LazyHead]) {
108
- if (property === "description" || property === "keywords") {
109
+ if (seo.value[property as keyof LazyHead]) {
110
+ console.log("property:", property);
111
+ console.log("seokKey:", seoKey);
112
+ if (
113
+ property === "description" ||
114
+ property === "keywords" ||
115
+ property.startsWith("twitter")
116
+ ) {
109
117
  metas.push({
110
118
  name: property,
111
119
  content: seo.value[seoKey as keyof LazyHead],
@@ -120,10 +128,6 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
120
128
  });
121
129
  });
122
130
 
123
- if (seo.value.description) {
124
- metas.push({ name: "description", content: seo.value.description });
125
- }
126
-
127
131
  return metas;
128
132
  }),
129
133
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {