--- import FormattedDate from "@/components/FormattedDate.astro"; import Card from "../componentsBefore/Card.astro"; import { Icon } from "astro-icon/components"; import Label from "../componentsBefore/Label.astro"; import type { PostItem } from "@/types"; interface Props { content: PostItem; readingTime: string; ogImage: string; } const { content: { data, dateToCmp }, readingTime, ogImage, } = Astro.props; const dateTimeOptions: Intl.DateTimeFormatOptions = { month: "long", }; const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url).href; --- { socialImageURL && (
{socialImageURL}
) } {data.draft ? (Draft) : null} { data.category && (
) }

{data.title}

/{" "} {readingTime}

{ data.date_modified && ( Updated: ) }
{ !!data.tags?.length && (
{data.tags.map((tag, i) => ( <> {/* prettier-ignore */} View more blogs with the tag {tag} {i < data.tags.length - 1 && ", "} ))}
) } { data.description && data.description.trim().length > 0 && (
{data.description}
) }