@fy-/fws-vue 1.7.9 → 1.8.3

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.
@@ -123,14 +123,12 @@ useHead({
123
123
  href: prevNextSeo.value.next,
124
124
  rel: "next",
125
125
  key: "next",
126
- hid: "next",
127
126
  });
128
127
  if (prevNextSeo.value.prev)
129
128
  result.push({
130
129
  href: prevNextSeo.value.prev,
131
130
  rel: "prev",
132
131
  key: "prev",
133
- hid: "prev",
134
132
  });
135
133
 
136
134
  return result;
@@ -29,7 +29,7 @@ export interface LazyHead {
29
29
  export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
30
30
  const route = useRoute();
31
31
  const currentLocale = seo.value.locale || getLocale();
32
-
32
+ const url = getURL();
33
33
  useHead({
34
34
  title: () => seo.value.title || "",
35
35
  link: () => {
@@ -45,14 +45,11 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
45
45
  }
46
46
  });
47
47
 
48
- if (seo.value.canonical) {
49
- links.push({
50
- rel: "canonical",
51
- href: seo.value.canonical,
52
- key: "canonical",
53
- hid: "canonical",
54
- });
55
- }
48
+ links.push({
49
+ rel: "canonical",
50
+ href: `${url.Scheme}://${url.Host}${route.fullPath}`,
51
+ key: "canonical",
52
+ });
56
53
 
57
54
  seo.value.alternateLocales?.forEach((locale) => {
58
55
  if (locale !== currentLocale) {
@@ -63,7 +60,6 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
63
60
  getURL().Host
64
61
  }/l/${locale}${getURL().Path.replace(getPrefix(), "")}`,
65
62
  key: `alternate-${locale}`,
66
- hid: `alternate-${locale}`,
67
63
  });
68
64
  }
69
65
  });
@@ -77,7 +73,7 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
77
73
  { property: "og:locale", content: currentLocale },
78
74
  {
79
75
  property: "og:url",
80
- hid: "og:url",
76
+ key: "og:url",
81
77
  content: seo.value.url
82
78
  ? seo.value.url
83
79
  : `${getURL().Scheme}://${getURL().Host}${route.fullPath}`,
@@ -85,29 +81,29 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
85
81
  {
86
82
  property: "og:type",
87
83
  content: seo.value.type || "website",
88
- hid: "og:type",
84
+ key: "og:type",
89
85
  },
90
86
  {
91
87
  name: "robots",
92
88
  content:
93
89
  "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
94
- hid: "robots",
90
+ key: "robots",
95
91
  },
96
92
  );
97
93
 
98
94
  if (seo.value.isAdult) {
99
95
  metas.push(
100
- { name: "rating", content: "adult", hid: "rating" },
96
+ { name: "rating", content: "adult", key: "rating" },
101
97
  {
102
98
  name: "RATING",
103
99
  content: "RTA-5042-1996-1400-1577-RTA",
104
- hid: "RTA",
100
+ key: "RTA",
105
101
  },
106
- { property: "rating", content: "adult", hid: "rating-property" },
102
+ { property: "rating", content: "adult", key: "rating-property" },
107
103
  {
108
104
  property: "RATING",
109
105
  content: "RTA-5042-1996-1400-1577-RTA",
110
- hid: "RTA-property",
106
+ key: "RTA-property",
111
107
  },
112
108
  );
113
109
  }
@@ -138,13 +134,13 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
138
134
  metas.push({
139
135
  name: property,
140
136
  content: seoValue,
141
- hid: property,
137
+ key: property,
142
138
  });
143
139
  } else {
144
140
  metas.push({
145
141
  property,
146
142
  content: seoValue as string,
147
- hid: property,
143
+ key: property,
148
144
  });
149
145
  }
150
146
  });
@@ -155,7 +151,7 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
155
151
  metas.push({
156
152
  name: "description",
157
153
  content: seo.value.description,
158
- hid: "description",
154
+ key: "description",
159
155
  });
160
156
  }
161
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "1.7.9",
3
+ "version": "1.8.3",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {