This commit is contained in:
2026-01-19 19:31:53 +01:00
parent 6797303628
commit 4abcc3fdf5
9 changed files with 1 additions and 86 deletions

View File

@@ -32,20 +32,11 @@ export async function generateMetadata({ params: { locale, slug } }: PageProps):
title: `${pageData.frontmatter.title} | KLZ Cables`,
description: pageData.frontmatter.excerpt || '',
url: `https://klz-cables.com/${locale}/${slug}`,
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: pageData.frontmatter.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: `${pageData.frontmatter.title} | KLZ Cables`,
description: pageData.frontmatter.excerpt || '',
images: ['/uploads/2025/02/og-2.webp'],
},
};
}

View File

@@ -16,8 +16,6 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro
if (!post) return {};
const description = post.frontmatter.excerpt || '';
const imageUrl = post.frontmatter.featuredImage || '/uploads/2025/02/og-2.webp';
return {
title: post.frontmatter.title,
description: description,
@@ -36,20 +34,11 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro
publishedTime: post.frontmatter.date,
authors: ['KLZ Cables'],
url: `https://klz-cables.com/${locale}/blog/${slug}`,
images: [
{
url: imageUrl,
width: 1200,
height: 630,
alt: post.frontmatter.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: `${post.frontmatter.title} | KLZ Cables`,
description: description,
images: [imageUrl],
},
};
}

View File

@@ -27,20 +27,11 @@ export async function generateMetadata({ params: { locale } }: BlogIndexProps) {
title: `${t('title')} | KLZ Cables`,
description: t('description'),
url: `https://klz-cables.com/${locale}/blog`,
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: t('title'),
},
],
},
twitter: {
card: 'summary_large_image',
title: `${t('title')} | KLZ Cables`,
description: t('description'),
images: ['/uploads/2025/02/og-2.webp'],
},
};
}

View File

@@ -26,20 +26,11 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps)
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
url: `https://klz-cables.com/${locale}/contact`,
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: t('title'),
},
],
},
twitter: {
card: 'summary_large_image',
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
images: ['/uploads/2025/02/og-2.webp'],
},
};
}

View File

@@ -36,20 +36,11 @@ export async function generateMetadata({params: {locale}}: {params: {locale: str
siteName: 'KLZ Cables',
title: t('title'),
description: t('description'),
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: 'KLZ Cables',
},
],
},
twitter: {
card: 'summary_large_image',
title: t('title'),
description: t('description'),
images: ['/uploads/2025/02/og-2.webp'],
},
robots: {
index: true,

View File

@@ -46,20 +46,11 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
title: `${categoryTitle} | KLZ Cables`,
description: categoryDesc,
url: `https://klz-cables.com/${locale}/products/${productSlug}`,
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: categoryTitle,
},
],
},
twitter: {
card: 'summary_large_image',
title: `${categoryTitle} | KLZ Cables`,
description: categoryDesc,
images: ['/uploads/2025/02/og-2.webp'],
},
};
}
@@ -67,8 +58,6 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
const product = await getProductBySlug(productSlug, locale);
if (!product) return {};
const imageUrl = product.frontmatter.images?.[0] || '/uploads/2025/02/og-2.webp';
return {
title: product.frontmatter.title,
description: product.frontmatter.description,
@@ -85,20 +74,11 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
description: product.frontmatter.description,
type: 'website',
url: `https://klz-cables.com/${locale}/products/${slug.join('/')}`,
images: [
{
url: imageUrl,
width: 1200,
height: 630,
alt: product.frontmatter.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: `${product.frontmatter.title} | KLZ Cables`,
description: product.frontmatter.description,
images: [imageUrl],
},
};
}

View File

@@ -30,20 +30,11 @@ export async function generateMetadata({ params: { locale } }: ProductsPageProps
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
url: `https://klz-cables.com/${locale}/products`,
images: [
{
url: '/uploads/2025/02/og-2.webp',
width: 1200,
height: 630,
alt: t('title'),
},
],
},
twitter: {
card: 'summary_large_image',
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
images: ['/uploads/2025/02/og-2.webp'],
},
};
}

View File

@@ -28,20 +28,11 @@ export async function generateMetadata({ params: { locale } }: TeamPageProps): P
title: `${t('hero.subtitle')} | KLZ Cables`,
description: t('hero.title'),
url: `https://klz-cables.com/${locale}/team`,
images: [
{
url: '/uploads/2024/12/DSC07655-Large.webp',
width: 1200,
height: 630,
alt: t('hero.subtitle'),
},
],
},
twitter: {
card: 'summary_large_image',
title: `${t('hero.subtitle')} | KLZ Cables`,
description: t('hero.title'),
images: ['/uploads/2024/12/DSC07655-Large.webp'],
},
};
}

File diff suppressed because one or more lines are too long