--- import type { CollectionEntry } from "astro:content"; import FormattedDate from "@/components/FormattedDate.astro"; import type { HTMLTag, Polymorphic } from "astro/types"; type Props = Polymorphic<{ as: Tag }> & { post: CollectionEntry<"post">; withDesc?: boolean; }; const { as: Tag = "div", post, withDesc = false } = Astro.props; --- {post.data.draft && (Draft) } {post.data.title} {withDesc && {post.data.description}}