Compare commits
1 Commits
feature/pr
...
feature/ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57bae7ed6f |
@@ -19,7 +19,7 @@ export async function generateMetadata({ params }: AboutPageProps): Promise<Meta
|
||||
const metadata = getPageMetadata(validLocale as Locale);
|
||||
const keywords = getPageKeywords(validLocale as Locale, 'about');
|
||||
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`;
|
||||
const localePrefix = `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix}/about`;
|
||||
|
||||
return {
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function generateMetadata({ params }: ContactPageProps): Promise<Me
|
||||
const metadata = getPageMetadata(validLocale as Locale);
|
||||
const keywords = getPageKeywords(validLocale as Locale, 'contact');
|
||||
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`;
|
||||
const localePrefix = `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix}/contact`;
|
||||
|
||||
return {
|
||||
|
||||
@@ -21,11 +21,11 @@ export async function generateMetadata({
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params;
|
||||
const validLocale = isValidLocale(locale) ? locale : DEFAULT_LOCALE;
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${locale}`;
|
||||
const localePrefix = `/${locale}`;
|
||||
|
||||
const languages: Record<string, string> = {};
|
||||
for (const loc of SUPPORTED_LOCALES) {
|
||||
const prefix = loc === DEFAULT_LOCALE ? "" : `/${loc}`;
|
||||
const prefix = `/${loc}`;
|
||||
languages[loc] = `${baseUrl}${prefix}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
|
||||
setRequestLocale(validLocale);
|
||||
|
||||
// Build canonical URL
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix || '/'}`;
|
||||
const localePrefix = `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix}`;
|
||||
|
||||
return {
|
||||
title: metadata.home.title,
|
||||
|
||||
@@ -57,7 +57,7 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
|
||||
const secondaryKeywords = keywords.secondary.map(replaceTemplate);
|
||||
|
||||
// Build canonical URL
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`;
|
||||
const localePrefix = `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix}/products/${slug}`;
|
||||
|
||||
// Get product image for OpenGraph
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function generateMetadata({ params }: ProductsPageProps): Promise<M
|
||||
const keywords = getPageKeywords(validLocale as Locale, 'products');
|
||||
|
||||
// Build canonical URL
|
||||
const localePrefix = validLocale === DEFAULT_LOCALE ? "" : `/${validLocale}`;
|
||||
const localePrefix = `/${validLocale}`;
|
||||
const canonicalUrl = `${baseUrl}${localePrefix}/products`;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user