--- import { Image } from 'astro:assets'; import type { ImageMetadata } from 'astro'; import FormattedDate from './FormattedDate.astro'; interface Props { title: string; description: string; pubDate: Date; heroImage?: ImageMetadata; category?: string; tags?: string[]; href: string; variant?: 'default' | 'compact' | 'featured'; class?: string; } const { title, description, pubDate, heroImage, category, tags, href, variant = 'default', class: className = '', } = Astro.props; // Compute estimated read time (rough estimate: 200 words per minute) // For now, we'll show a placeholder since we don't have word count in frontmatter const readTime = '5 min read'; const isCompact = variant === 'compact'; const isFeatured = variant === 'featured'; ---
{heroImage && ( )}
{category && (
{category}
)}
{readTime}

{title}

{description}

{tags && tags.length > 0 && !isCompact && (
{tags.slice(0, 4).map((tag) => ( {tag} ))}
)}
Read Article