Skip to content

Commit b8acf01

Browse files
authored
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.
1 parent 46b45fb commit b8acf01

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/Seo.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ function getDomain(languageCode: string): string {
3636
export const Seo = withRouter(
3737
({
3838
title,
39-
description = 'The library for web and native user interfaces',
4039
image = '/images/og-default.png',
4140
router,
4241
children,
@@ -50,11 +49,15 @@ export const Seo = withRouter(
5049
const pageTitle = isHomePage ? title : title + ' – React';
5150
// Twitter's meta parser is not very good.
5251
const twitterTitle = pageTitle.replace(/[<>]/g, '');
52+
let description = isHomePage
53+
? '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.'
54+
: 'The library for web and native user interfaces';
5355
return (
5456
<Head>
5557
<meta name="viewport" content="width=device-width, initial-scale=1" />
5658
{title != null && <title key="title">{pageTitle}</title>}
57-
{description != null && (
59+
{isHomePage && (
60+
// Let Google figure out a good description for each page.
5861
<meta name="description" key="description" content={description} />
5962
)}
6063
<link rel="canonical" href={canonicalUrl} />

0 commit comments

Comments
 (0)