From cd13b52ec1955255786720611a6a8647b549f780 Mon Sep 17 00:00:00 2001 From: TimLi Date: Tue, 8 Aug 2023 03:51:55 +0800 Subject: [PATCH 1/2] 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 --- src/components/Seo.tsx | 2 +- src/content/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Seo.tsx b/src/components/Seo.tsx index e76df63e29..d4f0371280 100644 --- a/src/components/Seo.tsx +++ b/src/components/Seo.tsx @@ -53,7 +53,7 @@ export const Seo = withRouter( const canonicalUrl = `https://${siteDomain}${ router.asPath.split(/[\?\#]/)[0] }`; - const pageTitle = isHomePage ? 'React' : title + ' – React'; + const pageTitle = isHomePage ? title : title + ' – React'; // Twitter's meta parser is not very good. const twitterTitle = pageTitle.replace(/[<>]/g, ''); return ( diff --git a/src/content/index.md b/src/content/index.md index 0ef5df597f..63dbd33eb6 100644 --- a/src/content/index.md +++ b/src/content/index.md @@ -1,6 +1,6 @@ --- id: home -title: React – The library for web and native user interfaces +title: React permalink: index.html --- From f9705c17e0477edd59e79520198dce3ab7ad003d Mon Sep 17 00:00:00 2001 From: Xavi Lee Date: Tue, 8 Aug 2023 10:27:29 +0800 Subject: [PATCH 2/2] fix conflict --- src/content/index.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/index.md b/src/content/index.md index d920a106ed..2f3dc74a58 100644 --- a/src/content/index.md +++ b/src/content/index.md @@ -1,10 +1,6 @@ --- id: home -<<<<<<< HEAD title: React 官方中文文档——用于构建 Web 和原生交互界面的库 -======= -title: React ->>>>>>> cd13b52ec1955255786720611a6a8647b549f780 permalink: index.html ---