From 42b06e1ef83cfe87eb6f84c3b78c7d0e48a16050 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 2 Feb 2026 12:10:09 +0100 Subject: [PATCH] refactor: Replace hardcoded domain with `SITE_URL` constant across metadata and schema definitions for improved configurability. --- app/[locale]/[slug]/page.tsx | 26 +- app/[locale]/blog/[slug]/opengraph-image.tsx | 28 +- app/[locale]/blog/[slug]/page.tsx | 140 +++++----- app/[locale]/blog/page.tsx | 97 +++++-- app/[locale]/contact/page.tsx | 111 +++++--- app/[locale]/page.tsx | 52 ++-- app/[locale]/products/[...slug]/page.tsx | 259 +++++++++++++------ app/[locale]/products/page.tsx | 90 +++++-- app/[locale]/team/page.tsx | 98 ++++--- app/robots.ts | 6 +- app/sitemap.ts | 6 +- lib/schema.ts | 11 +- scripts/pagespeed-sitemap.ts | 8 +- 13 files changed, 616 insertions(+), 316 deletions(-) diff --git a/app/[locale]/[slug]/page.tsx b/app/[locale]/[slug]/page.tsx index 547f4df7..3844f17f 100644 --- a/app/[locale]/[slug]/page.tsx +++ b/app/[locale]/[slug]/page.tsx @@ -6,6 +6,7 @@ import { Metadata } from 'next'; import { getPageBySlug, getAllPages } from '@/lib/pages'; import { mdxComponents } from '@/components/blog/MDXComponents'; import { getOGImageMetadata } from '@/lib/metadata'; +import { SITE_URL } from '@/lib/schema'; interface PageProps { params: { @@ -30,7 +31,7 @@ export async function generateStaticParams() { export async function generateMetadata({ params: { locale, slug } }: PageProps): Promise { const pageData = await getPageBySlug(slug, locale); - + if (!pageData) return {}; return { @@ -39,15 +40,15 @@ export async function generateMetadata({ params: { locale, slug } }: PageProps): alternates: { canonical: `/${locale}/${slug}`, languages: { - 'de': `/de/${slug}`, - 'en': `/en/${slug}`, + de: `/de/${slug}`, + en: `/en/${slug}`, 'x-default': `/en/${slug}`, }, }, openGraph: { title: `${pageData.frontmatter.title} | KLZ Cables`, description: pageData.frontmatter.excerpt || '', - url: `https://klz-cables.com/${locale}/${slug}`, + url: `${SITE_URL}/${locale}/${slug}`, images: getOGImageMetadata(slug, pageData.frontmatter.title, locale), }, twitter: { @@ -75,7 +76,9 @@ export default async function StandardPage({ params: { locale, slug } }: PagePro
- {t('badge')} + + {t('badge')} + {pageData.frontmatter.title} @@ -106,9 +109,14 @@ export default async function StandardPage({ params: { locale, slug } }: PagePro

{t('needHelp')}

{t('supportTeamAvailable')}

- - {t('contactUs')} - + + {t('contactUs')} + + → +
@@ -116,4 +124,4 @@ export default async function StandardPage({ params: { locale, slug } }: PagePro ); -} \ No newline at end of file +} diff --git a/app/[locale]/blog/[slug]/opengraph-image.tsx b/app/[locale]/blog/[slug]/opengraph-image.tsx index cd59db01..7c3138bd 100644 --- a/app/[locale]/blog/[slug]/opengraph-image.tsx +++ b/app/[locale]/blog/[slug]/opengraph-image.tsx @@ -2,10 +2,15 @@ import { ImageResponse } from 'next/og'; import { getPostBySlug } from '@/lib/blog'; import { OGImageTemplate } from '@/components/OGImageTemplate'; import { getOgFonts, OG_IMAGE_SIZE } from '@/lib/og-helper'; +import { SITE_URL } from '@/lib/schema'; export const runtime = 'nodejs'; -export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string } }) { +export default async function Image({ + params: { locale, slug }, +}: { + params: { locale: string; slug: string }; +}) { const post = await getPostBySlug(slug, locale); if (!post) { @@ -19,24 +24,21 @@ export default async function Image({ params: { locale, slug } }: { params: { lo // but if we are in nodejs runtime, we could potentially read from disk. // For now, let's just make sure it's absolute. const featuredImage = post.frontmatter.featuredImage - ? (post.frontmatter.featuredImage.startsWith('http') + ? post.frontmatter.featuredImage.startsWith('http') ? post.frontmatter.featuredImage - : `https://klz-cables.com${post.frontmatter.featuredImage}`) + : `${SITE_URL}${post.frontmatter.featuredImage}` : undefined; return new ImageResponse( - ( - - ), + , { ...OG_IMAGE_SIZE, fonts, - } + }, ); } - diff --git a/app/[locale]/blog/[slug]/page.tsx b/app/[locale]/blog/[slug]/page.tsx index c3f79c99..b75e253b 100644 --- a/app/[locale]/blog/[slug]/page.tsx +++ b/app/[locale]/blog/[slug]/page.tsx @@ -20,9 +20,11 @@ interface BlogPostProps { }; } -export async function generateMetadata({ params: { locale, slug } }: BlogPostProps): Promise { +export async function generateMetadata({ + params: { locale, slug }, +}: BlogPostProps): Promise { const post = await getPostBySlug(slug, locale); - + if (!post) return {}; const description = post.frontmatter.excerpt || ''; @@ -32,8 +34,8 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro alternates: { canonical: `/${locale}/blog/${slug}`, languages: { - 'de': `/de/blog/${slug}`, - 'en': `/en/blog/${slug}`, + de: `/de/blog/${slug}`, + en: `/en/blog/${slug}`, 'x-default': `/en/blog/${slug}`, }, }, @@ -43,7 +45,7 @@ export async function generateMetadata({ params: { locale, slug } }: BlogPostPro type: 'article', publishedTime: post.frontmatter.date, authors: ['KLZ Cables'], - url: `https://klz-cables.com/${locale}/blog/${slug}`, + url: `${SITE_URL}/${locale}/blog/${slug}`, images: getOGImageMetadata(`blog/${slug}`, post.frontmatter.title, locale), }, twitter: { @@ -66,16 +68,15 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro return (
- {/* Featured Image Header */} {post.frontmatter.featuredImage ? (
-
- + {/* Title overlay on image */}
@@ -87,7 +88,10 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro
)} - + {post.frontmatter.title}
@@ -95,7 +99,7 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro {new Date(post.frontmatter.date).toLocaleDateString(locale, { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', })} @@ -123,7 +127,7 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro {new Date(post.frontmatter.date).toLocaleDateString(locale, { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', })} @@ -168,8 +172,18 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro href={`/${locale}/blog`} className="inline-flex items-center gap-3 text-text-secondary hover:text-primary font-bold text-sm uppercase tracking-widest transition-all group" > - - + + {locale === 'de' ? 'Zurück zur Übersicht' : 'Back to Overview'} @@ -188,57 +202,63 @@ export default async function BlogPost({ params: { locale, slug } }: BlogPostPro {/* Structured Data */}
); diff --git a/app/[locale]/blog/page.tsx b/app/[locale]/blog/page.tsx index b4a456c0..a0feb0ad 100644 --- a/app/[locale]/blog/page.tsx +++ b/app/[locale]/blog/page.tsx @@ -4,6 +4,7 @@ import { Section, Container, Heading, Card, Badge, Button } from '@/components/u import Reveal from '@/components/Reveal'; import { getTranslations } from 'next-intl/server'; import { getOGImageMetadata } from '@/lib/metadata'; +import { SITE_URL } from '@/lib/schema'; interface BlogIndexProps { params: { @@ -19,15 +20,15 @@ export async function generateMetadata({ params: { locale } }: BlogIndexProps) { alternates: { canonical: `/${locale}/blog`, languages: { - 'de': '/de/blog', - 'en': '/en/blog', + de: '/de/blog', + en: '/en/blog', 'x-default': '/en/blog', }, }, openGraph: { title: `${t('title')} | KLZ Cables`, description: t('description'), - url: `https://klz-cables.com/${locale}/blog`, + url: `${SITE_URL}/${locale}/blog`, images: getOGImageMetadata('blog', t('title'), locale), }, twitter: { @@ -41,10 +42,10 @@ export async function generateMetadata({ params: { locale } }: BlogIndexProps) { export default async function BlogIndex({ params: { locale } }: BlogIndexProps) { const t = await getTranslations('Blog'); const posts = await getAllPosts(locale); - + // Sort posts by date descending - const sortedPosts = [...posts].sort((a, b) => - new Date(b.frontmatter.date).getTime() - new Date(a.frontmatter.date).getTime() + const sortedPosts = [...posts].sort( + (a, b) => new Date(b.frontmatter.date).getTime() - new Date(a.frontmatter.date).getTime(), ); const featuredPost = sortedPosts[0]; @@ -65,10 +66,12 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps)
)} - +
- {t('featuredPost')} + + {t('featuredPost')} + {featuredPost && ( <> @@ -77,9 +80,16 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps)

{featuredPost.frontmatter.excerpt}

- )} @@ -97,10 +107,30 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps)
{/* Category filters could go here */} - {t('categories.all')} - {t('categories.industry')} - {t('categories.technical')} - {t('categories.sustainability')} + + {t('categories.all')} + + + {t('categories.industry')} + + + {t('categories.technical')} + + + {t('categories.sustainability')} +
@@ -120,7 +150,10 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps) />
{post.frontmatter.category && ( - + {post.frontmatter.category} )} @@ -131,7 +164,7 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps) {new Date(post.frontmatter.date).toLocaleDateString(locale, { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', })}

@@ -145,8 +178,18 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps) {t('readMore')}
- - + +

@@ -156,13 +199,21 @@ export default async function BlogIndex({ params: { locale } }: BlogIndexProps) ))} - + {/* Pagination Placeholder */}
- - - - + + + +
diff --git a/app/[locale]/contact/page.tsx b/app/[locale]/contact/page.tsx index 56bf04db..ff68627c 100644 --- a/app/[locale]/contact/page.tsx +++ b/app/[locale]/contact/page.tsx @@ -23,7 +23,9 @@ interface ContactPageProps { }; } -export async function generateMetadata({ params: { locale } }: ContactPageProps): Promise { +export async function generateMetadata({ + params: { locale }, +}: ContactPageProps): Promise { const t = await getTranslations({ locale, namespace: 'Contact' }); const title = t('meta.title') || t('title'); const description = t('meta.description') || t('subtitle'); @@ -31,7 +33,7 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps) title, description, alternates: { - canonical: `https://klz-cables.com/${locale}/contact`, + canonical: `${SITE_URL}/${locale}/contact`, languages: { 'de-DE': '/de/contact', 'en-US': '/en/contact', @@ -40,7 +42,7 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps) openGraph: { title: `${title} | KLZ Cables`, description, - url: `https://klz-cables.com/${locale}/contact`, + url: `${SITE_URL}/${locale}/contact`, siteName: 'KLZ Cables', images: getOGImageMetadata('contact', title, locale), locale: `${locale.toUpperCase()}_DE`, @@ -78,7 +80,7 @@ export default async function ContactPage({ params }: ContactPageProps) { '@type': 'ListItem', position: 1, name: t('title'), - item: `https://klz-cables.com/${locale}/contact`, + item: `${SITE_URL}/${locale}/contact`, }, ], }} @@ -89,9 +91,9 @@ export default async function ContactPage({ params }: ContactPageProps) { '@context': 'https://schema.org', '@type': 'LocalBusiness', name: 'KLZ Cables', - image: 'https://klz-cables.com/logo.png', - '@id': 'https://klz-cables.com', - url: 'https://klz-cables.com', + image: `${SITE_URL}/logo.png`, + '@id': SITE_URL, + url: SITE_URL, address: { '@type': 'PostalAddress', streetAddress: 'Raiffeisenstraße 22', @@ -107,20 +109,12 @@ export default async function ContactPage({ params }: ContactPageProps) { openingHoursSpecification: [ { '@type': 'OpeningHoursSpecification', - dayOfWeek: [ - 'Monday', - 'Tuesday', - 'Wednesday', - 'Thursday', - 'Friday' - ], + dayOfWeek: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], opens: '08:00', - closes: '17:00' - } + closes: '17:00', + }, ], - sameAs: [ - 'https://www.linkedin.com/company/klz-cables' - ] + sameAs: ['https://www.linkedin.com/company/klz-cables'], }} /> {/* Hero Section */} @@ -154,36 +148,71 @@ export default async function ContactPage({ params }: ContactPageProps) {
- - - + + +
-

{t('info.office')}

+

+ {t('info.office')} +

{t('info.address')}

-
- - + +
-

{t('info.email')}

- info@klz-cables.com +

+ {t('info.email')} +

+ + info@klz-cables.com +
- {t('hours.title')} + + {t('hours.title')} +
  • {t('hours.weekdays')} @@ -199,24 +228,28 @@ export default async function ContactPage({ params }: ContactPageProps) { {/* Contact Form */}
    -
    }> +
+ } + > - + {/* Map Section */}
- -
Loading Map...
- }> - + +
Loading Map...
+ + } + > +
diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index a9e46a9e..51593708 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -20,25 +20,45 @@ export default function HomePage({ params: { locale } }: { params: { locale: str
- - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
); } -export async function generateMetadata({ params: { locale } }: { params: { locale: string } }): Promise { +export async function generateMetadata({ + params: { locale }, +}: { + params: { locale: string }; +}): Promise { // Use translations for meta where available (namespace: Index.meta) // Fallback to a sensible default if translation keys are missing. let t; @@ -62,15 +82,15 @@ export async function generateMetadata({ params: { locale } }: { params: { local alternates: { canonical: `/${locale}`, languages: { - 'de': '/de', - 'en': '/en', + de: '/de', + en: '/en', 'x-default': '/en', }, }, openGraph: { title: `${title} | KLZ Cables`, description, - url: `https://klz-cables.com/${locale}`, + url: `${SITE_URL}/${locale}`, images: getOGImageMetadata('', title, locale), }, twitter: { diff --git a/app/[locale]/products/[...slug]/page.tsx b/app/[locale]/products/[...slug]/page.tsx index 4daee5ee..df1eab87 100644 --- a/app/[locale]/products/[...slug]/page.tsx +++ b/app/[locale]/products/[...slug]/page.tsx @@ -31,12 +31,23 @@ export async function generateMetadata({ params }: ProductPageProps): Promise g[1].toUpperCase()); - const categoryTitle = t.has(`categories.${categoryKey}.title`) ? t(`categories.${categoryKey}.title`) : fileSlug; - const categoryDesc = t.has(`categories.${categoryKey}.description`) ? t(`categories.${categoryKey}.description`) : ''; + const categoryKey = fileSlug + .replace(/-cables$/, '') + .replace(/-([a-z])/g, (g) => g[1].toUpperCase()); + const categoryTitle = t.has(`categories.${categoryKey}.title`) + ? t(`categories.${categoryKey}.title`) + : fileSlug; + const categoryDesc = t.has(`categories.${categoryKey}.description`) + ? t(`categories.${categoryKey}.description`) + : ''; return { title: categoryTitle, @@ -44,15 +55,15 @@ export async function generateMetadata({ params }: ProductPageProps): Promise

, + p: (props: any) => ( +

+ ), h2: (props: any) => (

-

+

), - h3: (props: any) =>

, + h3: (props: any) => ( +

+ ), ul: (props: any) =>
    , section: (props: any) =>
    , li: (props: any) => (
  • - +
  • ), strong: (props: any) => , @@ -117,13 +144,26 @@ const components = { ), - th: (props: any) =>
    , - td: (props: any) => , + th: (props: any) => ( + + ), + td: (props: any) => ( + + ), hr: () =>
    , blockquote: (props: any) => (
    -
    +
    ), }; @@ -134,28 +174,36 @@ export default async function ProductPage({ params }: ProductPageProps) { const t = await getTranslations('Products'); // Check if it's a category page - const categories = ['low-voltage-cables', 'medium-voltage-cables', 'high-voltage-cables', 'solar-cables']; + const categories = [ + 'low-voltage-cables', + 'medium-voltage-cables', + 'high-voltage-cables', + 'solar-cables', + ]; const fileSlug = await mapSlugToFileSlug(productSlug, locale); - + if (categories.includes(fileSlug)) { const allProducts = await getAllProducts(locale); - const categoryKey = fileSlug.replace(/-cables$/, '').replace(/-([a-z])/g, (g) => g[1].toUpperCase()); - const categoryTitle = t.has(`categories.${categoryKey}.title`) ? t(`categories.${categoryKey}.title`) : fileSlug; - + const categoryKey = fileSlug + .replace(/-cables$/, '') + .replace(/-([a-z])/g, (g) => g[1].toUpperCase()); + const categoryTitle = t.has(`categories.${categoryKey}.title`) + ? t(`categories.${categoryKey}.title`) + : fileSlug; + // Filter products for this category - const filteredProducts = allProducts.filter(p => - p.frontmatter.categories.some(cat => - cat.toLowerCase().replace(/\s+/g, '-') === fileSlug || - cat === categoryTitle - ) + const filteredProducts = allProducts.filter((p) => + p.frontmatter.categories.some( + (cat) => cat.toLowerCase().replace(/\s+/g, '-') === fileSlug || cat === categoryTitle, + ), ); // Get translated product slugs const productsWithTranslatedSlugs = await Promise.all( filteredProducts.map(async (p) => ({ ...p, - translatedSlug: await mapFileSlugToTranslated(p.slug, locale) - })) + translatedSlug: await mapFileSlugToTranslated(p.slug, locale), + })), ); return ( @@ -164,7 +212,9 @@ export default async function ProductPage({ params }: ProductPageProps) {
    @@ -202,7 +252,10 @@ export default async function ProductPage({ params }: ProductPageProps) {
    {product.frontmatter.categories.map((cat, i) => ( - + {cat} ))} @@ -217,8 +270,18 @@ export default async function ProductPage({ params }: ProductPageProps) { {t('details')} - - + +
    @@ -238,7 +301,9 @@ export default async function ProductPage({ params }: ProductPageProps) { } // Extract technical data for schema - const technicalDataMatch = product.content.match(/technicalData=\{\}/s); + const technicalDataMatch = product.content.match( + /technicalData=\{\}/s, + ); let technicalItems = []; if (technicalDataMatch) { try { @@ -253,11 +318,15 @@ export default async function ProductPage({ params }: ProductPageProps) { const isFallback = (product.frontmatter as any).isFallback; const categorySlug = slug[0]; const categoryFileSlug = await mapSlugToFileSlug(categorySlug, locale); - const categoryKey = categoryFileSlug.replace(/-cables$/, '').replace(/-([a-z])/g, (g) => g[1].toUpperCase()); - const categoryTitle = t.has(`categories.${categoryKey}.title`) ? t(`categories.${categoryKey}.title`) : categoryFileSlug; + const categoryKey = categoryFileSlug + .replace(/-cables$/, '') + .replace(/-([a-z])/g, (g) => g[1].toUpperCase()); + const categoryTitle = t.has(`categories.${categoryKey}.title`) + ? t(`categories.${categoryKey}.title`) + : categoryFileSlug; const sidebar = ( -
    - +
    - +
    {isFallback && ( @@ -308,7 +384,11 @@ export default async function ProductPage({ params }: ProductPageProps) { )}
    {product.frontmatter.categories.map((cat, idx) => ( - + {cat} ))} @@ -329,11 +409,14 @@ export default async function ProductPage({ params }: ProductPageProps) { {/* Large Product Image Section */} {product.frontmatter.images && product.frontmatter.images.length > 0 && ( -
    +
    - {product.frontmatter.title}
    - + {product.frontmatter.images.length > 1 && (
    {product.frontmatter.images.slice(0, 5).map((img, idx) => ( -
    - +
    +
    ))}
    @@ -360,7 +451,7 @@ export default async function ProductPage({ params }: ProductPageProps) {
    {/* Main Content Area */}
    - +
    {/* Datasheet Download Section - Only for Medium Voltage for now */} @@ -379,45 +470,49 @@ export default async function ProductPage({ params }: ProductPageProps) { {/* Structured Data */} ({ - '@type': 'PropertyValue', - name: item.label, - value: item.value, - })), - category: product.frontmatter.categories.join(', '), - mainEntityOfPage: { - '@type': 'WebPage', - '@id': `https://klz-cables.com/${locale}/products/${slug.join('/')}`, - }, - } as any} + data={ + { + '@context': 'https://schema.org', + '@type': 'Product', + name: product.frontmatter.title, + description: product.frontmatter.description, + sku: product.frontmatter.sku || product.slug.toUpperCase(), + image: product.frontmatter.images?.[0] + ? `${SITE_URL}${product.frontmatter.images[0]}` + : undefined, + brand: { + '@type': 'Brand', + name: 'KLZ Cables', + }, + offers: { + '@type': 'Offer', + availability: 'https://schema.org/InStock', + priceCurrency: 'EUR', + url: `${SITE_URL}/${locale}/products/${slug.join('/')}`, + itemCondition: 'https://schema.org/NewCondition', + }, + additionalProperty: technicalItems.map((item: any) => ({ + '@type': 'PropertyValue', + name: item.label, + value: item.value, + })), + category: product.frontmatter.categories.join(', '), + mainEntityOfPage: { + '@type': 'WebPage', + '@id': `${SITE_URL}/${locale}/products/${slug.join('/')}`, + }, + } as any + } />
    {/* Related Products Section */}
    -
    diff --git a/app/[locale]/products/page.tsx b/app/[locale]/products/page.tsx index 1e8e83e1..ee8a11da 100644 --- a/app/[locale]/products/page.tsx +++ b/app/[locale]/products/page.tsx @@ -7,6 +7,7 @@ import Image from 'next/image'; import Link from 'next/link'; import { mapFileSlugToTranslated } from '@/lib/slugs'; import { getOGImageMetadata } from '@/lib/metadata'; +import { SITE_URL } from '@/lib/schema'; interface ProductsPageProps { params: { @@ -14,7 +15,9 @@ interface ProductsPageProps { }; } -export async function generateMetadata({ params: { locale } }: ProductsPageProps): Promise { +export async function generateMetadata({ + params: { locale }, +}: ProductsPageProps): Promise { const t = await getTranslations({ locale, namespace: 'Products' }); const title = t('meta.title') || t('title'); const description = t('meta.description') || t('subtitle'); @@ -24,15 +27,15 @@ export async function generateMetadata({ params: { locale } }: ProductsPageProps alternates: { canonical: `/${locale}/products`, languages: { - 'de': '/de/products', - 'en': '/en/products', + de: '/de/products', + en: '/en/products', 'x-default': '/en/products', }, }, openGraph: { title: `${title} | KLZ Cables`, description, - url: `https://klz-cables.com/${locale}/products`, + url: `${SITE_URL}/${locale}/products`, images: getOGImageMetadata('products', title, locale), }, twitter: { @@ -58,29 +61,29 @@ export default async function ProductsPage({ params }: ProductsPageProps) { desc: t('categories.lowVoltage.description'), img: '/uploads/2024/11/low-voltage-category.webp', icon: '/uploads/2024/11/Low-Voltage.svg', - href: `/${params.locale}/products/${lowVoltageSlug}` + href: `/${params.locale}/products/${lowVoltageSlug}`, }, { title: t('categories.mediumVoltage.title'), desc: t('categories.mediumVoltage.description'), img: '/uploads/2024/11/medium-voltage-category.webp', icon: '/uploads/2024/11/Medium-Voltage.svg', - href: `/${params.locale}/products/${mediumVoltageSlug}` + href: `/${params.locale}/products/${mediumVoltageSlug}`, }, { title: t('categories.highVoltage.title'), desc: t('categories.highVoltage.description'), img: '/uploads/2024/11/high-voltage-category.webp', icon: '/uploads/2024/11/High-Voltage.svg', - href: `/${params.locale}/products/${highVoltageSlug}` + href: `/${params.locale}/products/${highVoltageSlug}`, }, { title: t('categories.solar.title'), desc: t('categories.solar.description'), img: '/uploads/2024/11/solar-category.webp', icon: '/uploads/2024/11/Solar.svg', - href: `/${params.locale}/products/${solarSlug}` - } + href: `/${params.locale}/products/${solarSlug}`, + }, ]; return ( @@ -89,7 +92,10 @@ export default async function ProductsPage({ params }: ProductsPageProps) {
    - + {t('heroSubtitle')} @@ -97,16 +103,24 @@ export default async function ProductsPage({ params }: ProductsPageProps) { green: (chunks) => ( {chunks} - + - ) + ), })}

    {t('subtitle')}

    - @@ -123,8 +137,8 @@ export default async function ProductsPage({ params }: ProductsPageProps) {
    - {category.title}
    - +
    - +
    - + {t('categoryLabel')}

    @@ -155,8 +178,18 @@ export default async function ProductsPage({ params }: ProductsPageProps) { {t('viewProducts')}
    - - + +

    @@ -168,7 +201,7 @@ export default async function ProductsPage({ params }: ProductsPageProps) {
    - + {/* Technical Support CTA */}
    @@ -177,14 +210,23 @@ export default async function ProductsPage({ params }: ProductsPageProps) {
    -

    {t('cta.title')}

    +

    + {t('cta.title')} +

    {t('cta.description')}

    -
    diff --git a/app/[locale]/team/page.tsx b/app/[locale]/team/page.tsx index f29a6c28..1c15141f 100644 --- a/app/[locale]/team/page.tsx +++ b/app/[locale]/team/page.tsx @@ -24,15 +24,15 @@ export async function generateMetadata({ params: { locale } }: TeamPageProps): P alternates: { canonical: `/${locale}/team`, languages: { - 'de': '/de/team', - 'en': '/en/team', + de: '/de/team', + en: '/en/team', 'x-default': '/en/team', }, }, openGraph: { title: `${title} | KLZ Cables`, description, - url: `https://klz-cables.com/${locale}/team`, + url: `${SITE_URL}/${locale}/team`, images: getOGImageMetadata('team', title, locale), }, twitter: { @@ -50,9 +50,7 @@ export default async function TeamPage({ params: { locale } }: TeamPageProps) {
    {/* Hero Section */} @@ -101,9 +95,11 @@ export default async function TeamPage({ params: { locale } }: TeamPageProps) { />
    - + - {t('hero.badge')} + + {t('hero.badge')} + {t('hero.subtitle')} @@ -120,7 +116,9 @@ export default async function TeamPage({ params: { locale } }: TeamPageProps) {
    - {t('michael.role')} + + {t('michael.role')} + {t('michael.name')} @@ -133,9 +131,9 @@ export default async function TeamPage({ params: { locale } }: TeamPageProps) {

    {t('michael.description')}

    -