@fy-/fws-vue 2.0.9 → 2.0.12

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 +12 -1
  2. package/package.json +1 -1
@@ -32,6 +32,18 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
32
32
  const route = useRoute();
33
33
  const currentLocale = getLocale();
34
34
  const url = getURL();
35
+
36
+ if (seoData.value.image && seoData.value.image.includes("?vars=")) {
37
+ if (seoData.value.imageType) {
38
+ seoData.value.image = seoData.value.image.replace(
39
+ "?vars=",
40
+ `.${seoData.value.imageType}?vars=`,
41
+ );
42
+ } else {
43
+ seoData.value.image = seoData.value.image.replace("?vars=", ".png?vars=");
44
+ }
45
+ }
46
+
35
47
  useHead({
36
48
  meta: () => {
37
49
  const metas: any[] = [];
@@ -111,7 +123,6 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
111
123
  keywords: () => seoData.value.keywords,
112
124
  articlePublishedTime: () => seoData.value.published,
113
125
  articleModifiedTime: () => seoData.value.modified,
114
- ogImage: () => seoData.value.image,
115
126
  ogImageSecureUrl: () => seoData.value.image,
116
127
  ogImageUrl: () => seoData.value.image,
117
128
  ogImageType: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.09",
3
+ "version": "2.0.12",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {