Skip to content

Commit cd13b52

Browse files
authored
Fix homepage title (#5838)
* Fix homepage title Fixed homepage title bug, now the homepage will display the title from `content/index.md` instead of the constant `React`. * Update index.md Change title to "React" to keep same
1 parent a472775 commit cd13b52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Seo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const Seo = withRouter(
5353
const canonicalUrl = `https://${siteDomain}${
5454
router.asPath.split(/[\?\#]/)[0]
5555
}`;
56-
const pageTitle = isHomePage ? 'React' : title + ' – React';
56+
const pageTitle = isHomePage ? title : title + ' – React';
5757
// Twitter's meta parser is not very good.
5858
const twitterTitle = pageTitle.replace(/[<>]/g, '');
5959
return (

src/content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: home
3-
title: React – The library for web and native user interfaces
3+
title: React
44
permalink: index.html
55
---
66

0 commit comments

Comments
 (0)