--- import type { MediaValue, ContentBylineCredit } from "emdash"; import { Image } from "emdash/ui"; interface Props { title: string; excerpt?: string; featuredImage?: MediaValue | string; href: string; date?: Date; readingTime?: number; tags?: Array<{ slug: string; label: string }>; bylines?: ContentBylineCredit[]; } const { title, excerpt, featuredImage, href, date, readingTime, tags, bylines, } = Astro.props; const formattedDate = date ? date.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric", }) : null; ---
{ featuredImage ? (
) : (
) }
{ bylines && bylines.length > 0 && ( <> {(formattedDate || readingTime) && } ) } {formattedDate && } {formattedDate && readingTime && } {readingTime && {readingTime} min}

{title}

{excerpt &&

{excerpt}

}
{ tags && tags.length > 0 && (
{tags.slice(0, 2).map((tag) => ( {tag.label} ))}
) }