import Image from 'next/image' import Link from 'next/link' import type { ContentMeta } from '@/lib/content/schema' import { JsonLd } from '@/app/(landing)/components/json-ld' interface ContentAuthorPageProps { /** Route base path, e.g. `/blog` or `/library`. */ basePath: string authorName?: string authorAvatarUrl?: string /** Posts already filtered down to this author. */ posts: ContentMeta[] graphJsonLd?: Record } /** Shared author-profile layout for a content section. */ export function ContentAuthorPage({ basePath, authorName, authorAvatarUrl, posts, graphJsonLd, }: ContentAuthorPageProps) { if (!authorName) { return (

Author not found

) } return (
{graphJsonLd && }
{authorAvatarUrl ? ( {authorName} ) : null}

{authorName}

{posts.map((p) => (
{p.title}
{new Date(p.date).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', })}
{p.title}
))}
) }