{post.data.subcategory}
{post.data.title}
{shortSummary &&{post.data.summary}
} {longSummary &&{post.body.slice(0, 500)}
} {fullText &&{post.body}
}--- import type { CollectionEntry } from "astro:content"; interface Props { post: CollectionEntry<"blog">; componentType: "short" | "long" | "full"; } const { post, componentType } = Astro.props; let showTags, shortSummary, longSummary, fullText; switch (componentType) { case "full": fullText = true; break; case "long": longSummary = true; showTags = true; break; case "short": shortSummary = true; break; default: break; } ---
{post.data.subcategory}
{post.data.summary}
} {longSummary &&{post.body.slice(0, 500)}
} {fullText &&{post.body}
}