--- import { getCollection } from "astro:content"; const badges = await getCollection("badges"); ---
{badges.map((badge) => { const hasHref = badge.data.href !== undefined; // ugh. // i wish we could dedupe this, but im not sure how return <> {hasHref ? {typeof badge.data.path !== "string" ? {badge.data.alt} : {badge.data.alt} } : <> {typeof badge.data.path !== "string" ? {badge.data.alt} : {badge.data.alt} } } ; })}