migration wip

This commit is contained in:
2025-12-30 00:06:54 +01:00
parent 3efbac78cb
commit 89dbf8af87
94 changed files with 5674 additions and 308 deletions

View File

@@ -58,9 +58,9 @@ function RelatedPosts({ currentSlug, locale }: { currentSlug: string; locale: 'e
<h3 className="font-semibold text-gray-900 group-hover:text-blue-600 transition-colors mb-2 line-clamp-2">
{post.title}
</h3>
<p className="text-sm text-gray-600 line-clamp-2 mb-2">
{post.excerptHtml}
</p>
<div className="text-sm text-gray-600 line-clamp-2 mb-2">
<ContentRenderer content={post.excerptHtml} />
</div>
<span className="text-xs text-blue-600 font-medium">
{t('blog.readMore', locale as 'en' | 'de')}
</span>
@@ -214,7 +214,7 @@ export default async function BlogDetailPage({ params }: PageProps) {
{/* Article Content */}
<div className="mb-12">
<ContentRenderer
content={post.contentHtml}
content={processedContent}
className="prose prose-lg prose-blue"
/>
</div>

View File

@@ -74,10 +74,12 @@ export default async function Page({ params }: PageProps) {
}
// Use contentHtml if available, otherwise use excerptHtml
const contentToDisplay = page.contentHtml && page.contentHtml.trim() !== ''
? page.contentHtml
// Both should be processed through ContentRenderer which handles shortcodes
const contentToDisplay = page.contentHtml && page.contentHtml.trim() !== ''
? page.contentHtml
: page.excerptHtml;
// Process the content to handle shortcodes and convert to HTML
const processedContent = processHTML(contentToDisplay || '');
// Get featured image if available
@@ -119,7 +121,7 @@ export default async function Page({ params }: PageProps) {
</h1>
{page.excerptHtml && (
<ContentRenderer
content={page.excerptHtml}
content={processHTML(page.excerptHtml)}
className="text-lg sm:text-xl text-gray-600 leading-relaxed"
/>
)}
@@ -129,7 +131,7 @@ export default async function Page({ params }: PageProps) {
{processedContent && (
<ResponsiveWrapper className="bg-white rounded-lg shadow-sm p-6 sm:p-8" container={true} maxWidth="full">
<ContentRenderer
content={contentToDisplay || ''}
content={processedContent}
className="prose prose-lg max-w-none"
/>
</ResponsiveWrapper>