Skip to content

Commit 2faafb8

Browse files
committed
fix alt on seo
1 parent a530151 commit 2faafb8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,30 +78,30 @@ export default function SchedulePage({
7878
);
7979
}
8080
let re = /(\w+).null - /;
81-
81+
const title = post?.title?.replace(re, '');
8282
return (
8383
<>
8484
<NextSeo
85-
title={post?.title?.replace(re, '')}
85+
title={title}
8686
description={post?.excerpt}
8787
canonical={`https://codingcat.dev/schedule/${post.slug}`}
8888
openGraph={{
8989
type: 'website',
9090
locale: 'en_US',
9191
url: `https://codingcat.dev/schedule/${post.slug}`,
92-
title: post?.title?.replace(re, ''),
92+
title,
9393
description: post?.excerpt,
9494
site_name: 'CodingCatDev',
9595
images: [
9696
{
9797
url: `https://media.codingcat.dev/image/upload/f_png,c_fit,w_1200,h_630${post?.coverPhoto?.public_id}`,
9898
width: 1200,
9999
height: 630,
100-
alt: post?.title,
100+
alt: title || 'Call AJ',
101101
},
102102
{
103103
url: `https://media.codingcat.dev/image/upload/f_png${post?.coverPhoto?.public_id}`,
104-
alt: post?.title,
104+
alt: title || 'Call AJ',
105105
},
106106
],
107107
}}

0 commit comments

Comments
 (0)