--- 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 '~/utils/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 && ( ) }
{ post.category && ( <> {' '} ยท{' '} {post.category.replaceAll('-', ' ')} ) }

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

{post.excerpt &&

{post.excerpt}

}