--- import AvatarComponent from '@/components/ui/avatar' import { Badge } from '@/components/ui/badge' import { Separator } from '@/components/ui/separator' import { parseAuthors } from '@/lib/server-utils' import { formatDate, readingTime } from '@/lib/utils' import { Image } from 'astro:assets' import type { CollectionEntry } from 'astro:content' import Link from './Link.astro' type Props = { entry: CollectionEntry<'blog'> } const { entry } = Astro.props as { entry: CollectionEntry<'blog'> } const formattedDate = formatDate(entry.data.date) const readTime = readingTime(entry.body!) const authors = await parseAuthors(entry.data.authors ?? []) ---
{ entry.data.image && (
{entry.data.title}
) }

{entry.data.title}

{entry.data.description}

{ authors.length > 0 && ( <> {authors.map((author) => (
{author.name}
))} ) } {formattedDate} {readTime}
{ entry.data.tags && (
{entry.data.tags.map((tag) => ( {tag} ))}
) }