File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ const MarkdownPage = ({
74
74
} } >
75
75
< TitleAndMetaTags
76
76
ogDescription = { ogDescription }
77
+ ogType = "article"
77
78
canonicalUrl = { createCanonicalUrl ( markdownRemark . fields . slug ) }
78
79
title = { `${ titlePrefix } ${ titlePostfix } ` }
79
80
/>
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ type Props = {
17
17
title : string ,
18
18
ogDescription : string ,
19
19
canonicalUrl : string ,
20
+ ogType : string ,
20
21
} ;
21
22
22
23
// only provide alternate links to pages in languages where 95-100% of core content has been translated
@@ -45,11 +46,16 @@ const defaultPage = canonicalUrl => {
45
46
return canonicalUrl . replace ( urlRoot , 'https://reactjs.org' ) ;
46
47
} ;
47
48
48
- const TitleAndMetaTags = ( { title, ogDescription, canonicalUrl} : Props ) => {
49
+ const TitleAndMetaTags = ( {
50
+ title,
51
+ ogDescription,
52
+ canonicalUrl,
53
+ ogType = 'website' ,
54
+ } : Props ) => {
49
55
return (
50
56
< Helmet title = { title } >
51
57
< meta property = "og:title" content = { title } />
52
- < meta property = "og:type" content = "website" />
58
+ < meta property = "og:type" content = { ogType } />
53
59
{ canonicalUrl && < meta property = "og:url" content = { canonicalUrl } /> }
54
60
< meta property = "og:image" content = "https://reactjs.org/logo-og.png" />
55
61
< meta
You can’t perform that action at this time.
0 commit comments