wip
This commit is contained in:
@@ -32,20 +32,11 @@ export async function generateMetadata({ params: { locale, slug } }: PageProps):
|
|||||||
title: `${pageData.frontmatter.title} | KLZ Cables`,
|
title: `${pageData.frontmatter.title} | KLZ Cables`,
|
||||||
description: pageData.frontmatter.excerpt || '',
|
description: pageData.frontmatter.excerpt || '',
|
||||||
url: `https://klz-cables.com/${locale}/${slug}`,
|
url: `https://klz-cables.com/${locale}/${slug}`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: pageData.frontmatter.title,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${pageData.frontmatter.title} | KLZ Cables`,
|
title: `${pageData.frontmatter.title} | KLZ Cables`,
|
||||||
description: pageData.frontmatter.excerpt || '',
|
description: pageData.frontmatter.excerpt || '',
|
||||||
images: ['/uploads/2025/02/og-2.webp'],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro
|
|||||||
if (!post) return {};
|
if (!post) return {};
|
||||||
|
|
||||||
const description = post.frontmatter.excerpt || '';
|
const description = post.frontmatter.excerpt || '';
|
||||||
const imageUrl = post.frontmatter.featuredImage || '/uploads/2025/02/og-2.webp';
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: post.frontmatter.title,
|
title: post.frontmatter.title,
|
||||||
description: description,
|
description: description,
|
||||||
@@ -36,20 +34,11 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro
|
|||||||
publishedTime: post.frontmatter.date,
|
publishedTime: post.frontmatter.date,
|
||||||
authors: ['KLZ Cables'],
|
authors: ['KLZ Cables'],
|
||||||
url: `https://klz-cables.com/${locale}/blog/${slug}`,
|
url: `https://klz-cables.com/${locale}/blog/${slug}`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: imageUrl,
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: post.frontmatter.title,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${post.frontmatter.title} | KLZ Cables`,
|
title: `${post.frontmatter.title} | KLZ Cables`,
|
||||||
description: description,
|
description: description,
|
||||||
images: [imageUrl],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,20 +27,11 @@ export async function generateMetadata({ params: { locale } }: BlogIndexProps) {
|
|||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('description'),
|
description: t('description'),
|
||||||
url: `https://klz-cables.com/${locale}/blog`,
|
url: `https://klz-cables.com/${locale}/blog`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: t('title'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('description'),
|
description: t('description'),
|
||||||
images: ['/uploads/2025/02/og-2.webp'],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,20 +26,11 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps)
|
|||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description: t('subtitle'),
|
||||||
url: `https://klz-cables.com/${locale}/contact`,
|
url: `https://klz-cables.com/${locale}/contact`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: t('title'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description: t('subtitle'),
|
||||||
images: ['/uploads/2025/02/og-2.webp'],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,20 +36,11 @@ export async function generateMetadata({params: {locale}}: {params: {locale: str
|
|||||||
siteName: 'KLZ Cables',
|
siteName: 'KLZ Cables',
|
||||||
title: t('title'),
|
title: t('title'),
|
||||||
description: t('description'),
|
description: t('description'),
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: 'KLZ Cables',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: t('title'),
|
title: t('title'),
|
||||||
description: t('description'),
|
description: t('description'),
|
||||||
images: ['/uploads/2025/02/og-2.webp'],
|
|
||||||
},
|
},
|
||||||
robots: {
|
robots: {
|
||||||
index: true,
|
index: true,
|
||||||
|
|||||||
@@ -46,20 +46,11 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
|
|||||||
title: `${categoryTitle} | KLZ Cables`,
|
title: `${categoryTitle} | KLZ Cables`,
|
||||||
description: categoryDesc,
|
description: categoryDesc,
|
||||||
url: `https://klz-cables.com/${locale}/products/${productSlug}`,
|
url: `https://klz-cables.com/${locale}/products/${productSlug}`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: categoryTitle,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${categoryTitle} | KLZ Cables`,
|
title: `${categoryTitle} | KLZ Cables`,
|
||||||
description: categoryDesc,
|
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);
|
const product = await getProductBySlug(productSlug, locale);
|
||||||
if (!product) return {};
|
if (!product) return {};
|
||||||
|
|
||||||
const imageUrl = product.frontmatter.images?.[0] || '/uploads/2025/02/og-2.webp';
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: product.frontmatter.title,
|
title: product.frontmatter.title,
|
||||||
description: product.frontmatter.description,
|
description: product.frontmatter.description,
|
||||||
@@ -85,20 +74,11 @@ export async function generateMetadata({ params }: ProductPageProps): Promise<Me
|
|||||||
description: product.frontmatter.description,
|
description: product.frontmatter.description,
|
||||||
type: 'website',
|
type: 'website',
|
||||||
url: `https://klz-cables.com/${locale}/products/${slug.join('/')}`,
|
url: `https://klz-cables.com/${locale}/products/${slug.join('/')}`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: imageUrl,
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: product.frontmatter.title,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${product.frontmatter.title} | KLZ Cables`,
|
title: `${product.frontmatter.title} | KLZ Cables`,
|
||||||
description: product.frontmatter.description,
|
description: product.frontmatter.description,
|
||||||
images: [imageUrl],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,20 +30,11 @@ export async function generateMetadata({ params: { locale } }: ProductsPageProps
|
|||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description: t('subtitle'),
|
||||||
url: `https://klz-cables.com/${locale}/products`,
|
url: `https://klz-cables.com/${locale}/products`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2025/02/og-2.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: t('title'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${t('title')} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description: t('subtitle'),
|
||||||
images: ['/uploads/2025/02/og-2.webp'],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,20 +28,11 @@ export async function generateMetadata({ params: { locale } }: TeamPageProps): P
|
|||||||
title: `${t('hero.subtitle')} | KLZ Cables`,
|
title: `${t('hero.subtitle')} | KLZ Cables`,
|
||||||
description: t('hero.title'),
|
description: t('hero.title'),
|
||||||
url: `https://klz-cables.com/${locale}/team`,
|
url: `https://klz-cables.com/${locale}/team`,
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: '/uploads/2024/12/DSC07655-Large.webp',
|
|
||||||
width: 1200,
|
|
||||||
height: 630,
|
|
||||||
alt: t('hero.subtitle'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('hero.subtitle')} | KLZ Cables`,
|
title: `${t('hero.subtitle')} | KLZ Cables`,
|
||||||
description: t('hero.title'),
|
description: t('hero.title'),
|
||||||
images: ['/uploads/2024/12/DSC07655-Large.webp'],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user