File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ interface OpenGraph {
9
9
image : string ;
10
10
type : string ;
11
11
url : string ;
12
+ description : string ;
12
13
}
13
14
14
15
interface LayoutProps {
@@ -22,13 +23,14 @@ const Layout: React.FC<LayoutProps> = ({
22
23
} ) => (
23
24
< >
24
25
< Head >
25
- < title > William Edmisten</ title >
26
- < meta name = "description" content = "William Edmisten" />
26
+ < title > { opengraph ?. title || " William Edmisten" } </ title >
27
+ < meta name = "description" content = { opengraph ?. description || "William Edmisten's personal developer blog." } />
27
28
{ opengraph && < >
28
29
< meta property = "og:title" content = { opengraph . title } />
29
30
< meta property = "og:type" content = { opengraph . type } />
30
31
< meta property = "og:image" content = { opengraph . image } />
31
32
< meta property = "og:url" content = { opengraph . url } />
33
+ { opengraph ?. description && < meta property = "og:description" content = { opengraph . description } /> }
32
34
</ > }
33
35
< link rel = "icon" href = "/favicon.ico" />
34
36
< link
Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ export async function getStaticProps({ params }: { params: any }) {
116
116
title : meta . title ,
117
117
image : `https://wcedmisten.fyi${ meta . thumbnail } ` ,
118
118
type : "article" ,
119
- url : `https://wcedmisten.fyi/post/${ source . filename } /`
119
+ url : `https://wcedmisten.fyi/post/${ source . filename } /` ,
120
+ description : meta . description
120
121
}
121
122
} ,
122
123
}
You can’t perform that action at this time.
0 commit comments