--- import type { ImageMetadata } from 'astro'; import { Icon } from 'astro-icon/components'; import Image from 'components/common/Image.astro'; import PostTags from 'components/blog/Tags.astro'; import { APP_BLOG } from 'astrowind:config'; import type { Post } from 'types'; import { getPermalink } from 'utils/permalinks'; import { findImage } from 'utils/images'; import { getFormattedDate } from 'utils/utils'; export interface Props { post: Post; } const { post } = Astro.props; const image = (await findImage(post.image)) as ImageMetadata | undefined; const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') : ''; ---
{ image && (link ? ( ) : ( )) }
{ post.author && ( <> {' '} · {post.author.replaceAll('-', ' ')} ) } { post.category && ( <> {' '} ·{' '} {post.category.title} ) }

{ link ? ( {post.title} ) : ( post.title ) }

{post.excerpt &&

{post.excerpt}

} { post.tags && Array.isArray(post.tags) ? (
) : ( ) }