--- 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, postFooter; switch (componentType) { case "full": postFooter = true; showTags = true; fullText = true; break; case "long": longSummary = true; showTags = true; break; case "short": shortSummary = true; break; default: break; } const postDateFormatted = post.data.date.toLocaleDateString("tr-TR", { day: "numeric", month: "long", year: "numeric", }); const base = import.meta.env.BASE_URL; const postLink = `${base}/category/${post.data.category}/${post.slug}`; const { Content } = await post.render(); ---

{post.data.title}

{ showTags && (
    {post.data.tags.map((tag) => (
  • {tag}
  • ))}
) }

    {postDateFormatted}

{shortSummary &&

{post.data.summary}

} { longSummary && ( <>

{post.body.slice(0, 500).replace(/(<([^>]+)>)/gi, "")}

{post.body.length > 500 && ( Devamını Oku )} ) } { fullText && (
) } {postFooter &&

{postDateFormatted}

}