@fy-/fws-vue 2.0.23 → 2.0.25
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.
|
@@ -10,6 +10,10 @@ defineProps({
|
|
|
10
10
|
type: String,
|
|
11
11
|
default: "blog",
|
|
12
12
|
},
|
|
13
|
+
imageDomain: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "https://s.nocachenocry.com",
|
|
16
|
+
},
|
|
13
17
|
});
|
|
14
18
|
</script>
|
|
15
19
|
|
|
@@ -27,7 +31,7 @@ defineProps({
|
|
|
27
31
|
<meta
|
|
28
32
|
itemprop="thumbnailUrl"
|
|
29
33
|
v-if="article.CoverUUID"
|
|
30
|
-
:content="
|
|
34
|
+
:content="`${imageDomain}/${article.CoverUUID}?vars=format=webp:resize=512x512`"
|
|
31
35
|
/>
|
|
32
36
|
<RouterLink
|
|
33
37
|
:to="`/${type}/${article.Slug}`"
|
|
@@ -35,7 +39,7 @@ defineProps({
|
|
|
35
39
|
:alt="article.Title"
|
|
36
40
|
><img
|
|
37
41
|
v-if="article.CoverUUID"
|
|
38
|
-
:src="
|
|
42
|
+
:src="`${imageDomain}/${article.CoverUUID}?vars=format=webp:scale_crop_center=400x195`"
|
|
39
43
|
loading="lazy"
|
|
40
44
|
:title="article.Title"
|
|
41
45
|
:alt="article.Title"
|
|
@@ -18,6 +18,7 @@ const props = withDefaults(
|
|
|
18
18
|
showTitle?: boolean;
|
|
19
19
|
postValue?: any;
|
|
20
20
|
passData?: boolean;
|
|
21
|
+
imageDomain?: string;
|
|
21
22
|
}>(),
|
|
22
23
|
{
|
|
23
24
|
baseBreadcrumb: () => [],
|
|
@@ -26,6 +27,7 @@ const props = withDefaults(
|
|
|
26
27
|
showTitle: true,
|
|
27
28
|
postValue: () => undefined,
|
|
28
29
|
passData: false,
|
|
30
|
+
imageDomain: "https://s.nocachenocry.com",
|
|
29
31
|
},
|
|
30
32
|
);
|
|
31
33
|
|
|
@@ -47,7 +49,7 @@ const getBlogPost = async () => {
|
|
|
47
49
|
seo.value.description = post.value.Overview;
|
|
48
50
|
|
|
49
51
|
if (post.value.CoverUUID) {
|
|
50
|
-
seo.value.image =
|
|
52
|
+
seo.value.image = `${props.imageDomain}/${post.value.CoverUUID}?vars=format=png:resize=512x512`;
|
|
51
53
|
seo.value.imageWidth = "512";
|
|
52
54
|
seo.value.imageHeight = "512";
|
|
53
55
|
seo.value.imageType = "image/png";
|
|
@@ -93,7 +95,7 @@ useSeo(seo);
|
|
|
93
95
|
<meta
|
|
94
96
|
itemprop="thumbnailUrl"
|
|
95
97
|
v-if="post.CoverUUID"
|
|
96
|
-
:content="
|
|
98
|
+
:content="`${props.imageDomain}/${post.CoverUUID}?vars=format=webp:resize=512x512`"
|
|
97
99
|
/>
|
|
98
100
|
<div class="py-4 px-4 max-w-6xl mx-auto" v-if="showTitle">
|
|
99
101
|
<h1
|
|
@@ -110,7 +112,7 @@ useSeo(seo);
|
|
|
110
112
|
</div>
|
|
111
113
|
<img
|
|
112
114
|
v-if="post.CoverUUID && showImage"
|
|
113
|
-
:src="
|
|
115
|
+
:src="`${props.imageDomain}/${post.CoverUUID}?vars=format=webp:resize=768x768`"
|
|
114
116
|
:alt="post.Title"
|
|
115
117
|
class="h-auto rounded-xl shadow max-w-[768px] max-h-[280px] mx-auto mb-6"
|
|
116
118
|
/>
|
package/composables/seo.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface LazyHead {
|
|
|
30
30
|
|
|
31
31
|
export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
32
32
|
const route = useRoute();
|
|
33
|
-
const
|
|
33
|
+
const currentLocale = getLocale();
|
|
34
34
|
const url = getURL();
|
|
35
35
|
|
|
36
36
|
useHead({
|
|
@@ -83,7 +83,11 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
83
83
|
|
|
84
84
|
useSeoMeta({
|
|
85
85
|
ogUrl: () => `${getURL().Scheme}://${getURL().Host}${route.fullPath}`,
|
|
86
|
-
ogLocale: () =>
|
|
86
|
+
ogLocale: () => {
|
|
87
|
+
if (currentLocale) {
|
|
88
|
+
return currentLocale.replace("-", "_");
|
|
89
|
+
}
|
|
90
|
+
},
|
|
87
91
|
robots:
|
|
88
92
|
"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
89
93
|
title: () => seoData.value.title,
|