--- import markdownToText from "@helpers/markdownToText"; import { Card } from "./card"; import { useTranslatedPath, useTranslations } from "@i18n/utils"; import Image from "@components/Image.astro"; import type { ImageMetadata } from "astro"; interface Props { post: { data: { title: string; icon?: string; cover?: ImageMetadata; }; collection: string; slug: string; body: string; }; } const { data: { title, cover, icon }, collection, body, slug, } = Astro.props.post; const translatePath = useTranslatedPath(Astro.url); const t = useTranslations(Astro.url); const link = translatePath(`/${collection}/${slug.split("/")[0]}`); --- {icon && } {title} {markdownToText(body).slice(0, 200)} { cover && ( {"cover ) }