From 08503a83189631b91c8309b3a8a857c4a8f0015d Mon Sep 17 00:00:00 2001 From: David Barratt Date: Tue, 4 Aug 2020 06:07:56 -0400 Subject: [PATCH] Make og:type article for markdown pages (#3146) (#3147) --- src/components/MarkdownPage/MarkdownPage.js | 1 + src/components/TitleAndMetaTags/TitleAndMetaTags.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/MarkdownPage/MarkdownPage.js b/src/components/MarkdownPage/MarkdownPage.js index 26c3b363..a8904abb 100644 --- a/src/components/MarkdownPage/MarkdownPage.js +++ b/src/components/MarkdownPage/MarkdownPage.js @@ -74,6 +74,7 @@ const MarkdownPage = ({ }}> diff --git a/src/components/TitleAndMetaTags/TitleAndMetaTags.js b/src/components/TitleAndMetaTags/TitleAndMetaTags.js index 09f96aa1..ab6361a9 100644 --- a/src/components/TitleAndMetaTags/TitleAndMetaTags.js +++ b/src/components/TitleAndMetaTags/TitleAndMetaTags.js @@ -17,6 +17,7 @@ type Props = { title: string, ogDescription: string, canonicalUrl: string, + ogType: string, }; // only provide alternate links to pages in languages where 95-100% of core content has been translated @@ -45,11 +46,16 @@ const defaultPage = canonicalUrl => { return canonicalUrl.replace(urlRoot, 'https://reactjs.org'); }; -const TitleAndMetaTags = ({title, ogDescription, canonicalUrl}: Props) => { +const TitleAndMetaTags = ({ + title, + ogDescription, + canonicalUrl, + ogType = 'website', +}: Props) => { return ( - + {canonicalUrl && }