{post.title}
{post.excerptHtml && ({post.excerptHtml}
)}import { notFound } from 'next/navigation'; import type { Metadata } from 'next'; import Link from 'next/link'; import { getPostBySlug, getPostsByLocale, getMediaById, getSiteInfo } from '@/lib/data'; import { processHTML } from '@/lib/html-compat'; import { getLocalizedPath } from '@/lib/i18n'; import { t } from '@/lib/i18n'; import { SEO } from '@/components/SEO'; import { LocaleSwitcher } from '@/components/LocaleSwitcher'; import { ContentRenderer } from '@/components/content/ContentRenderer'; interface PageProps { params: { slug: string; locale?: string; }; } function RelatedPosts({ currentSlug, locale }: { currentSlug: string; locale: 'en' | 'de' }) { const allPosts = getPostsByLocale(locale); const currentPost = allPosts.find((p: any) => p.slug === currentSlug); if (!currentPost) return null; // Get recent posts (excluding current) const relatedPosts = allPosts .filter((p: any) => p.slug !== currentSlug) .slice(0, 3); if (relatedPosts.length === 0) return null; return (
{post.excerptHtml}
)}