Skip to content

Commit 2db06b2

Browse files
committed
fix: Update blog URL paths in metadata for consistent routing
1 parent f170df9 commit 2db06b2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/[locale]/blogs/BlogCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Image from "next/image";
66
export function BlogCard({ post, locale }: { post: BlogPost; locale: string }) {
77
return (
88
<I18nLink
9-
href={`/blogs/${post.slug}`}
9+
href={`/blogs${post.slug}`}
1010
prefetch={false}
1111
className="bg-transparent rounded-lg hover:underline"
1212
>

app/[locale]/blogs/[slug]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export async function generateMetadata({
3030
description: "Page not found",
3131
noIndex: true,
3232
locale: locale as Locale,
33-
path: `/blogs/${slug}`,
34-
canonicalUrl: `/blogs/${slug}`,
33+
path: `/blogs${slug}`,
34+
canonicalUrl: `/blogs${slug}`,
3535
});
3636
}
3737

@@ -41,8 +41,8 @@ export async function generateMetadata({
4141
description: post.description,
4242
images: post.image ? [post.image] : [],
4343
locale: locale as Locale,
44-
path: `/blogs/${slug}`,
45-
canonicalUrl: `/blogs/${slug}`,
44+
path: `/blogs${slug}`,
45+
canonicalUrl: `/blogs${slug}`,
4646
});
4747
}
4848

0 commit comments

Comments
 (0)