Skip to content

Commit

Permalink
simplify blog changes, do not change metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Oct 18, 2024
1 parent a732cda commit 62c93b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions packages/docusaurus-plugin-content-blog/src/blogUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '';

Expand Down Expand Up @@ -367,7 +366,6 @@ async function processBlogSourceFile(
editUrl: getBlogEditUrl(),
source: aliasedSource,
title,
title_meta,
description,
date,
tags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 <head><title> and <meta>.
*/
readonly title_meta?: string;
/**
* The publish date of the post. On client side, this will be serialized
* into a string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down

0 comments on commit 62c93b8

Please sign in to comment.