From 025be6c346a48e74d7128b4d2f7b321f87503396 Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Sat, 7 May 2022 09:06:41 +1000 Subject: [PATCH 1/3] fix: page title and og:title meta aren't emitted if using default page title --- packages/docusaurus-theme-common/src/utils/metadataUtils.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx index 9610faa2e40b..cc00f02e2fa2 100644 --- a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx @@ -37,8 +37,8 @@ export function PageMetadata({ return ( - {title && {pageTitle}} - {title && } + {pageTitle && {pageTitle}} + {pageTitle && } {description && } {description && } From 1f459652ba4f16c7a367c5fc776a5ab5f008c92b Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 27 May 2022 17:45:16 +0200 Subject: [PATCH 2/3] revert --- packages/docusaurus-theme-common/src/utils/metadataUtils.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx index 72307731e39a..af91c55a3a3c 100644 --- a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx @@ -37,8 +37,8 @@ export function PageMetadata({ return ( - {pageTitle && {pageTitle}} - {pageTitle && } + {title && {pageTitle}} + {title && } {description && } {description && } From a54511b4da31c503119b6c0e1f8999f0fd21ca54 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 27 May 2022 17:46:09 +0200 Subject: [PATCH 3/3] apply siteTitle as default title --- packages/docusaurus/src/client/SiteMetadataDefaults.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/client/SiteMetadataDefaults.tsx b/packages/docusaurus/src/client/SiteMetadataDefaults.tsx index bd2f953aab3e..e3ba631fbbe5 100644 --- a/packages/docusaurus/src/client/SiteMetadataDefaults.tsx +++ b/packages/docusaurus/src/client/SiteMetadataDefaults.tsx @@ -12,15 +12,17 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; export default function SiteMetadataDefaults(): JSX.Element { const { - siteConfig: {favicon, tagline, title}, + siteConfig: {favicon, title}, i18n: {currentLocale, localeConfigs}, } = useDocusaurusContext(); const faviconUrl = useBaseUrl(favicon); const {htmlLang, direction: htmlDir} = localeConfigs[currentLocale]!; return ( - + + {title} + {favicon && } );