@fy-/fws-vue 2.0.54 → 2.0.55

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 +30 -8
  2. package/package.json +1 -1
@@ -43,13 +43,6 @@ 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
- }
53
46
 
54
47
  return metas;
55
48
  },
@@ -123,7 +116,36 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
123
116
  keywords: () => seoData.value.keywords,
124
117
  articlePublishedTime: () => seoData.value.published,
125
118
  articleModifiedTime: () => seoData.value.modified,
126
-
119
+ ogImageSecureUrl: () => {
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
+ },
127
149
  ogImageType: () => {
128
150
  if (seoData.value.imageType) {
129
151
  return seoData.value.imageType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.54",
3
+ "version": "2.0.55",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {