{post.frontmatter.title}
{post.frontmatter.excerpt && ({post.frontmatter.excerpt}
)} {locale === 'de' ? 'Weiterlesen' : 'Read more'} →import Link from 'next/link'; import { getAllPosts } from '@/lib/blog'; import { getTranslations } from 'next-intl/server'; interface BlogIndexProps { params: { locale: string; }; } export async function generateMetadata({ params: { locale } }: BlogIndexProps) { const t = await getTranslations({ locale, namespace: 'blog' }); return { title: locale === 'de' ? 'Neuigkeiten zu Kabeln und Energielösungen' : 'News on Cables and Energy Solutions', description: locale === 'de' ? 'Bleiben Sie auf dem Laufenden! Lesen Sie aktuelle Themen und Insights zu Kabeltechnologie, Energielösungen und branchenspezifischen Innovationen.' : 'Stay up to date! Read current topics and insights on cable technology, energy solutions and industry-specific innovations.', }; } export default async function BlogIndex({ params: { locale } }: BlogIndexProps) { const posts = await getAllPosts(locale); const t = await getTranslations({ locale, namespace: 'blog' }); // Get unique categories const categories = Array.from(new Set(posts.map(post => post.frontmatter.category).filter(Boolean))); return (
{locale === 'de' ? 'Bleiben Sie auf dem Laufenden! Lesen Sie aktuelle Themen und Insights zu Kabeltechnologie, Energielösungen und branchenspezifischen Innovationen.' : 'Stay up to date! Read current topics and insights on cable technology, energy solutions and industry-specific innovations.'}
{post.frontmatter.excerpt}
)} {locale === 'de' ? 'Weiterlesen' : 'Read more'} →