Skip to content

Commit 88c5868

Browse files
committed
fix title and excerpt
1 parent 0027ad7 commit 88c5868

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎frontend/main/src/pages/schedule/[slug].tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,20 @@ export default function SchedulePage({
7777
</Layout>
7878
);
7979
}
80+
let re = /(\w+).null - /;
81+
8082
return (
8183
<>
8284
<NextSeo
83-
title={post.title}
84-
description={post.excerpt}
85+
title={post?.title?.replace(re, '')}
86+
description={post?.excerpt}
8587
canonical={`https://codingcat.dev/schedule/${post.slug}`}
8688
openGraph={{
8789
type: 'website',
8890
locale: 'en_US',
8991
url: `https://codingcat.dev/schedule/${post.slug}`,
90-
title: post.title,
91-
description: post.excerpt,
92+
title: post?.title?.replace(re, ''),
93+
description: post?.excerpt,
9294
site_name: 'CodingCatDev',
9395
images: [
9496
{

0 commit comments

Comments
 (0)