@fy-/fws-vue 2.0.25 → 2.0.26

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.
@@ -6,6 +6,7 @@ import { useRest } from "../../composables/rest";
6
6
  import { LazyHead, useSeo } from "../../composables/seo";
7
7
  import type { BreadcrumbLink } from "../../types";
8
8
  import DefaultBreadcrumb from "../ui/DefaultBreadcrumb.vue";
9
+ import { defineWebPage, useSchemaOrg } from "@unhead/schema-org";
9
10
 
10
11
  const props = withDefaults(
11
12
  defineProps<{
@@ -19,6 +20,8 @@ const props = withDefaults(
19
20
  postValue?: any;
20
21
  passData?: boolean;
21
22
  imageDomain?: string;
23
+ multLanguage?: boolean;
24
+ urlSlug?: string;
22
25
  }>(),
23
26
  {
24
27
  baseBreadcrumb: () => [],
@@ -28,6 +31,8 @@ const props = withDefaults(
28
31
  postValue: () => undefined,
29
32
  passData: false,
30
33
  imageDomain: "https://s.nocachenocry.com",
34
+ multLanguage: true,
35
+ urlSlug: "blog",
31
36
  },
32
37
  );
33
38
 
@@ -59,7 +64,11 @@ const getBlogPost = async () => {
59
64
  } else {
60
65
  seo.value.locale = "en-US";
61
66
  }
62
- seo.value.url = `https://${props.baseUrl}/l/${seo.value.locale}/blog/${post.value.Slug}`;
67
+ if (props.multLanguage) {
68
+ seo.value.url = `https://${props.baseUrl}/l/${seo.value.locale}/${props.urlSlug}/${post.value.Slug}`;
69
+ } else {
70
+ seo.value.url = `https://${props.baseUrl}/${props.urlSlug}/${post.value.Slug}`;
71
+ }
63
72
  if (post.value.Locales && post.value.Locales.length > 1) {
64
73
  seo.value.alternateLocales = post.value.Locales;
65
74
  }
@@ -74,6 +83,12 @@ watchEffect(() => {
74
83
  getBlogPost();
75
84
  });
76
85
  useSeo(seo);
86
+ useSchemaOrg([
87
+ defineWebPage({
88
+ datePublished: post.value.CreatedAt.iso,
89
+ dateModified: post.value.UpdatedAt.iso,
90
+ }),
91
+ ]);
77
92
  </script>
78
93
  <template>
79
94
  <div>
@@ -87,6 +102,7 @@ useSeo(seo);
87
102
  />
88
103
  </div>
89
104
  <article itemscope itemtype="https://schema.org/Article">
105
+ <meta itemprop="mainEntityOfPage" content="#webpage" />
90
106
  <meta itemprop="wordCount" :content="post.WordCount" />
91
107
  <meta itemprop="datePublished" :content="post.CreatedAt.iso" />
92
108
  <meta itemprop="dateModified" :content="post.UpdatedAt.iso" />
@@ -16,10 +16,12 @@ const props = withDefaults(
16
16
  onClose?: Function;
17
17
  closeIcon?: Object;
18
18
  mSize?: string;
19
+ ofy?: string;
19
20
  }>(),
20
21
  {
21
22
  closeIcon: () => h(XCircleIcon),
22
23
  mSize: "w-full",
24
+ ofy: "overflow-y-auto",
23
25
  },
24
26
  );
25
27
 
@@ -63,7 +65,7 @@ onUnmounted(() => {
63
65
  style="z-index: 41"
64
66
  >
65
67
  <div
66
- :class="`relative ${mSize} max-w-6xl max-h-full overflow-y-auto bg-white rounded-lg shadow dark:bg-fv-neutral-900`"
68
+ :class="`relative ${mSize} max-w-6xl max-h-full ${ofy}bg-white rounded-lg shadow dark:bg-fv-neutral-900`"
67
69
  style="z-index: 42"
68
70
  >
69
71
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.25",
3
+ "version": "2.0.26",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {