@fy-/fws-vue 2.0.5 → 2.0.6

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 +15 -42
  2. package/package.json +1 -1
@@ -43,47 +43,6 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
43
43
  });
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
- metas.push({
53
- name: "twitter:image",
54
- content: seoData.value.image,
55
- key: "twitter:image",
56
- });
57
- metas.push({
58
- name: "image",
59
- content: seoData.value.image,
60
- key: "image",
61
- });
62
- }
63
- if (seoData.value.imageType && seoData.value.image) {
64
- metas.push({
65
- property: "og:image:type",
66
- content: seoData.value.imageType,
67
- key: "og:image:type",
68
- });
69
- metas.push({
70
- name: "twitter:image:type",
71
- content: seoData.value.imageType,
72
- key: "twitter:image:type",
73
- });
74
- } else if (seoData.value.image) {
75
- metas.push({
76
- property: "og:image:type",
77
- content: "image/png",
78
- key: "og:image:type",
79
- });
80
- metas.push({
81
- name: "twitter:image:type",
82
- content: "image/png",
83
- key: "twitter:image:type",
84
- });
85
- }
86
-
87
46
  return metas;
88
47
  },
89
48
  link: () => {
@@ -122,7 +81,7 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
122
81
  });
123
82
 
124
83
  useSeoMeta({
125
- ogUrl: `${getURL().Scheme}://${getURL().Host}${route.fullPath}`,
84
+ ogUrl: () => `${getURL().Scheme}://${getURL().Host}${route.fullPath}`,
126
85
  ogLocale: () => currentLocale,
127
86
  robots:
128
87
  "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
@@ -152,5 +111,19 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
152
111
  keywords: () => seoData.value.keywords,
153
112
  articlePublishedTime: () => seoData.value.published,
154
113
  articleModifiedTime: () => seoData.value.modified,
114
+ ogImage: () => seoData.value.image,
115
+ ogImageSecureUrl: () => seoData.value.image,
116
+ ogImageType: () => {
117
+ if (seoData.value.imageType) {
118
+ return seoData.value.imageType ? seoData.value.imageType : "image/png";
119
+ }
120
+ return undefined;
121
+ },
122
+ twitterImageType() {
123
+ if (seoData.value.imageType) {
124
+ return seoData.value.imageType ? seoData.value.imageType : "image/png";
125
+ }
126
+ return undefined;
127
+ },
155
128
  });
156
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.05",
3
+ "version": "2.0.06",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {