import { Avatar, AvatarFallback, AvatarImage } from '@sim/emcn' import Image from 'next/image' import Link from 'next/link' import { FAQ } from '@/lib/content/faq' import type { ContentMeta, ContentPost } from '@/lib/content/schema' import { BackLink } from '@/app/(landing)/components/back-link' import { JsonLd } from '@/app/(landing)/components/json-ld' import { ShareButton } from '@/app/(landing)/components/share-button' interface ContentPostPageProps { /** Route base path, e.g. `/blog` or `/library`. */ basePath: string /** Label for the back-to-index link, e.g. "Back to Blog". */ backLabel: string post: ContentPost related: ContentMeta[] graphJsonLd: Record shareUrl: string } /** * Shared post-detail layout for a content section (blog or library): header * with cover image/title/authors/share, MDX article body + FAQ, and related * posts. Both sections render this exact layout, parameterized by `basePath`. */ export function ContentPostPage({ basePath, backLabel, post, related, graphJsonLd, shareUrl, }: ContentPostPageProps) { const Article = post.Content return (
{post.title}

{post.title}

{post.description}

{(post.authors || [post.author]).map((a) => (
{a?.avatarUrl ? ( {a.name.slice(0, 2)} ) : null} {a?.name}
))}
{post.faq && post.faq.length > 0 ? : null}
{related.length > 0 && ( <>
)}
{post.wordCount && }
) }