--- import { getCollection } from "astro:content"; import Layout from "../../layouts/Layout.astro"; // Drafts render in dev and are not built. The check is on // import.meta.env.DEV rather than a flag, so there is no way to ship one by // forgetting to turn something back on. const posts = ( await getCollection("posts", ({ data }) => import.meta.env.DEV || !data.draft) ).sort((a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime()); const day = new Intl.DateTimeFormat("en", { dateStyle: "long", timeZone: "UTC", }); ---

updates

substandard · atom feed

{ posts.length === 0 ? (

someting broke :/

) : ( posts.map((post) => (

{post.data.title}

{post.data.description}

)) ) }