@@ -33,23 +33,20 @@ export async function generateMetadata({ params }): Promise<Metadata> {
33
33
title,
34
34
description,
35
35
type : 'article' ,
36
- images : [
37
- ...( isPatternPage && patternName ? [ {
38
- url : `/covers/patterns/${ patternName } .png` ,
39
- width : 800 ,
40
- height : 400 ,
41
- alt : `${ summary } - UX Pattern` ,
42
- } ] : [ ] ) ,
43
- {
44
- url : ogImageUrl ,
45
- width : 1200 ,
46
- height : 630 ,
47
- alt : description || title ,
48
- } ,
49
- ] ,
36
+ images : isPatternPage && patternName ? [ {
37
+ url : `/covers/patterns/${ patternName } .png` ,
38
+ width : 800 ,
39
+ height : 400 ,
40
+ alt : `Example of ${ patternName } pattern` ,
41
+ } ] : [ {
42
+ url : ogImageUrl ,
43
+ width : 1200 ,
44
+ height : 630 ,
45
+ alt : description || title ,
46
+ } ] ,
50
47
} ,
51
48
alternates : {
52
- canonical : `${ baseUrl } /${ params . lang } ${ path ? `/${ path } ` : '' } ` ,
49
+ canonical : `${ baseUrl } /en/ ${ path ? `/${ path } ` : '' } ` ,
53
50
} ,
54
51
}
55
52
}
@@ -78,7 +75,7 @@ export default async function Page(props: PageProps) {
78
75
const schemaData = generateArticleSchema (
79
76
title ,
80
77
description ,
81
- `/${ params . lang } /${ params . mdxPath ?. join ( '/' ) || '' } ` ,
78
+ `/en /${ params . mdxPath ?. join ( '/' ) || '' } ` ,
82
79
ogImageUrl
83
80
)
84
81
@@ -91,13 +88,13 @@ export default async function Page(props: PageProps) {
91
88
currentPath += `/${ segment } `
92
89
breadcrumbs . push ( {
93
90
title : segment . charAt ( 0 ) . toUpperCase ( ) + segment . slice ( 1 ) . replace ( / - / g, ' ' ) ,
94
- url : `/${ params . lang } ${ currentPath } `
91
+ url : `/en ${ currentPath } `
95
92
} )
96
93
}
97
94
}
98
95
99
96
const breadcrumbSchema = generateBreadcrumbSchema ( breadcrumbs )
100
- const pageKey = `${ params . lang } -${ params . mdxPath ?. join ( '-' ) || 'home' } `
97
+ const pageKey = `en -${ params . mdxPath ?. join ( '-' ) || 'home' } `
101
98
102
99
return (
103
100
< >
0 commit comments