fix: fix canonicalUrl

This commit is contained in:
javayhu 2025-05-22 22:30:35 +08:00
parent 044af8bf74
commit 28ad92e101
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ export async function generateMetadata({
return constructMetadata({
title: t('title'),
description: t('description'),
canonicalUrl: getUrlWithLocale('/', locale),
canonicalUrl: getUrlWithLocale('', locale),
});
}

View File

@ -34,7 +34,7 @@ export async function generateMetadata({
return constructMetadata({
title: `${category.name} | ${t('title')}`,
description: category.description,
canonicalUrl: getUrlWithLocale('/blog/category/${slug}', locale),
canonicalUrl: getUrlWithLocale(`/blog/category/${slug}`, locale),
});
}