@@ -19,21 +19,26 @@ export default (props: PublicPathProps) => (
19
19
< >
20
20
< PublicPath { ...props } />
21
21
< NextHead >
22
- < meta property = "og:type" content = "article" />
22
+ < meta property = "og:type" content = "article" />
23
23
24
- < meta property = "og:title" content = { props . path } />
25
- < meta property = "og:description" content = { props . description } />
26
- < meta property = "og:url" content = { props . ogUrl } />
27
- < meta property = "og:image" content = {
28
- props . customize . logoSquareURL ||
29
- `${ props . customize . siteURL } ${ ogShareLogo . src } `
30
- } />
24
+ < meta property = "og:title" content = { props . path } />
25
+ < meta property = "og:description" content = { props . description } />
26
+ < meta property = "og:url" content = { props . ogUrl } />
27
+ { props . customize && (
28
+ < meta
29
+ property = "og:image"
30
+ content = {
31
+ props . customize . logoSquareURL ||
32
+ `${ props . customize . siteURL } ${ ogShareLogo . src } `
33
+ }
34
+ />
35
+ ) }
31
36
32
- < meta property = "article:published_time" content = { props . created } />
33
- < meta property = "article:modified_time" content = { props . last_edited } />
37
+ < meta property = "article:published_time" content = { props . created } />
38
+ < meta property = "article:modified_time" content = { props . last_edited } />
34
39
</ NextHead >
35
40
</ >
36
- )
41
+ ) ;
37
42
38
43
export async function getServerSideProps ( context ) {
39
44
const id = context . params . id [ 0 ] ;
@@ -67,7 +72,10 @@ export async function getServerSideProps(context) {
67
72
68
73
// Add full URL for social media sharing
69
74
//
70
- customize . props . ogUrl = `${ customize . props . customize . siteURL } ${ shareURL ( id , relativePath ) } ` ;
75
+ customize . props . ogUrl = `${ customize . props . customize . siteURL } ${ shareURL (
76
+ id ,
77
+ relativePath ,
78
+ ) } `;
71
79
72
80
return customize ;
73
81
} catch ( _err ) {
0 commit comments