--- import type { CollectionEntry } from "astro:content"; import type { IElement } from "@/data/shared"; import { getFormattedDate } from "@/utils"; interface Props extends IElement { post: CollectionEntry<"post">; withDesc?: boolean; } const { post, as: Element = "div", withDesc = false } = Astro.props; const date = new Date(post.data.publishDate); const datetime = date.toISOString(); const postDate = getFormattedDate(date, { month: "short" }); --- {post.data.title} {withDesc && {post.data.description}}