diff --git a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts index 15ce6a100af2..a38460575b56 100644 --- a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts +++ b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts @@ -301,7 +301,6 @@ async function processBlogSourceFile( const date = await getDate(); const title = frontMatter.title ?? contentTitle ?? parsedBlogFileName.text; - const title_meta = frontMatter.title_meta ?? frontMatter.title ?? contentTitle ?? parsedBlogFileName.text; const description = frontMatter.description ?? excerpt ?? ''; @@ -367,7 +366,6 @@ async function processBlogSourceFile( editUrl: getBlogEditUrl(), source: aliasedSource, title, - title_meta, description, date, tags, diff --git a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts index ae87c060b563..1606aaa5f5e8 100644 --- a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts +++ b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts @@ -144,7 +144,7 @@ declare module '@docusaurus/plugin-content-blog' { */ title?: string; /** - * Will override the title collected from the frontMatter. + * Will be used for SEO page metadata and override BlogPostMetadata.title. * @see {@link BlogPostMetadata.title_meta} */ title_meta?: string; @@ -254,10 +254,6 @@ declare module '@docusaurus/plugin-content-blog' { * Used to generate the page h1 heading, tab title, and pagination title. */ readonly title: string; - /** - * Used to generate the and <meta>. - */ - readonly title_meta?: string; /** * The publish date of the post. On client side, this will be serialized * into a string. diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx index ca21379507de..2eb2eeb33b0e 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx @@ -17,7 +17,7 @@ export default function BlogPostPageMetadata(): JSX.Element { const image = assets.image ?? frontMatter.image; return ( <PageMetadata - title={metadata.title_meta ?? title} + title={frontMatter.title_meta ?? title} description={description} keywords={keywords} image={image}>