@fy-/fws-vue 1.9.99 → 2.0.1

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 +48 -3
  2. package/package.json +1 -1
@@ -42,6 +42,54 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
42
42
  });
43
43
  }
44
44
 
45
+ if (seoData.value.imageHeight && seoData.value.image) {
46
+ metas.push({
47
+ property: "og:image:height",
48
+ content: seoData.value.imageHeight,
49
+ key: "og:image:height",
50
+ });
51
+ metas.push({
52
+ name: "twitter:image:height",
53
+ content: seoData.value.imageHeight,
54
+ key: "twitter:image:height",
55
+ });
56
+ }
57
+ if (seoData.value.imageWidth && seoData.value.image) {
58
+ metas.push({
59
+ property: "og:image:width",
60
+ content: seoData.value.imageWidth,
61
+ key: "og:image:width",
62
+ });
63
+ metas.push({
64
+ name: "twitter:image:width",
65
+ content: seoData.value.imageWidth,
66
+ key: "twitter:image:width",
67
+ });
68
+ }
69
+ if (seoData.value.imageType && seoData.value.image) {
70
+ metas.push({
71
+ property: "og:image:type",
72
+ content: seoData.value.imageType,
73
+ key: "og:image:type",
74
+ });
75
+ metas.push({
76
+ name: "twitter:image:type",
77
+ content: seoData.value.imageType,
78
+ key: "twitter:image:type",
79
+ });
80
+ } else if (seoData.value.image) {
81
+ metas.push({
82
+ property: "og:image:type",
83
+ content: "image/png",
84
+ key: "og:image:type",
85
+ });
86
+ metas.push({
87
+ name: "twitter:image:type",
88
+ content: "image/png",
89
+ key: "twitter:image:type",
90
+ });
91
+ }
92
+
45
93
  return metas;
46
94
  },
47
95
  link: () => {
@@ -78,9 +126,6 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
78
126
  ogTitle: () => seoData.value.title,
79
127
  ogDescription: () => seoData.value.description,
80
128
  ogImage: () => seoData.value.image,
81
- image: () => seoData.value.image,
82
- imageWidth: () => seoData.value.imageWidth,
83
- imageHeight: () => seoData.value.imageHeight,
84
129
  twitterCard: "summary_large_image",
85
130
  twitterTitle: () => seoData.value.title,
86
131
  twitterDescription: () => seoData.value.description,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "1.9.99",
3
+ "version": "2.0.01",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {