--- import { Image } from 'astro:assets'; import type { ImageMetadata } from 'astro'; import { formatDate } from '@/lib/utils'; import Logo from '@/components/ui/marketing/Logo/Logo.astro'; import BlogImageSVG from '@/components/blog/BlogImageSVG.astro'; interface Props { title: string; description: string; publishedAt: Date; updatedAt?: Date; author?: string; tags?: string[]; image?: ImageMetadata; imageAlt?: string; svgSlug?: string; } const { title, description, publishedAt, updatedAt, author = 'Team', tags = [], image, imageAlt, svgSlug, } = Astro.props; // Estimate reading time const wordsPerMinute = 200; const estimatedWords = description.split(' ').length * 15; const readingTime = Math.max(1, Math.ceil(estimatedWords / wordsPerMinute)); ---
{tags.length > 0 && (
{tags.map((tag) => ( {tag} ))}
)}

{title}

{description}

{author}

{updatedAt && ( <>
)}
{readingTime} min read
{(svgSlug || image) && (
{svgSlug ? (
) : image ? (
{imageAlt
) : null}
)}