From b8acf016dcaf41bdec83775ca3d2f39346d00fd9 Mon Sep 17 00:00:00 2001 From: Sophie Alpert Date: Fri, 27 Oct 2023 16:30:20 -0700 Subject: [PATCH] Remove meta description from most pages (#6392) Google uses this on many of our API doc pages and it's not a good snippet. Only put this on the homepage but leave the og:description and twitter:description. --- src/components/Seo.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Seo.tsx b/src/components/Seo.tsx index 79f19f87c..34339a66d 100644 --- a/src/components/Seo.tsx +++ b/src/components/Seo.tsx @@ -36,7 +36,6 @@ function getDomain(languageCode: string): string { export const Seo = withRouter( ({ title, - description = 'The library for web and native user interfaces', image = '/images/og-default.png', router, children, @@ -50,11 +49,15 @@ export const Seo = withRouter( const pageTitle = isHomePage ? title : title + ' – React'; // Twitter's meta parser is not very good. const twitterTitle = pageTitle.replace(/[<>]/g, ''); + let description = isHomePage + ? 'React is the library for web and native user interfaces. Build user interfaces out of individual pieces called components written in JavaScript. React is designed to let you seamlessly combine components written by independent people, teams, and organizations.' + : 'The library for web and native user interfaces'; return ( {title != null && {pageTitle}} - {description != null && ( + {isHomePage && ( + // Let Google figure out a good description for each page. )}