File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export async function generateMetadata({ params }): Promise<Metadata> {
32
32
openGraph : {
33
33
title,
34
34
description,
35
- type : 'article' ,
35
+ type : isHomepage ? 'website' : 'article' ,
36
36
images : isPatternPage && patternName ? [ {
37
37
url : `/covers/patterns/${ patternName } .png` ,
38
38
width : 800 ,
@@ -45,6 +45,18 @@ export async function generateMetadata({ params }): Promise<Metadata> {
45
45
alt : description || title ,
46
46
} ] ,
47
47
} ,
48
+ twitter : {
49
+ card : 'summary_large_image' ,
50
+ site : '@thedaviddias' ,
51
+ creator : '@thedaviddias' ,
52
+ images : isPatternPage && patternName ? [ {
53
+ url : `/covers/patterns/${ patternName } .png` ,
54
+ alt : `Example of ${ patternName } pattern` ,
55
+ } ] : [ {
56
+ url : ogImageUrl ,
57
+ alt : description || title ,
58
+ } ] ,
59
+ } ,
48
60
alternates : {
49
61
canonical : `${ baseUrl } /en/${ path ? `${ path } ` : '' } ` ,
50
62
} ,
Original file line number Diff line number Diff line change @@ -30,7 +30,23 @@ const fontMono = FontMono({
30
30
variable : "--font-mono" ,
31
31
} ) ;
32
32
33
- export const metadata = metadataSEO
33
+ export const metadata = {
34
+ ...metadataSEO ,
35
+ openGraph : {
36
+ ...metadataSEO . openGraph ,
37
+ type : 'website'
38
+ } ,
39
+ twitter : {
40
+ ...metadataSEO . twitter ,
41
+ card : 'summary_large_image' ,
42
+ site : '@thedaviddias' ,
43
+ creator : '@thedaviddias' ,
44
+ images : [ {
45
+ url : '/og/opengraph-image.png' ,
46
+ alt : 'UX Patterns for Developers - A collection of UX patterns for building effective UI components'
47
+ } ]
48
+ }
49
+ }
34
50
35
51
export default async function RootLayout ( { children, params } : {
36
52
children : React . ReactNode
Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ export const metadataSEO: Metadata = {
36
36
} ,
37
37
twitter : {
38
38
card : 'summary_large_image' ,
39
- creator : '@thedaviddias'
39
+ creator : '@thedaviddias' ,
40
+ site : '@thedaviddias' ,
41
+ images : [ {
42
+ url : '/og/opengraph-image.png' ,
43
+ alt : 'UX Patterns for Developers - A collection of UX patterns for building effective UI components'
44
+ } ]
40
45
} ,
41
46
appleWebApp : {
42
47
title : 'UX Patterns for Devs'
You can’t perform that action at this time.
0 commit comments