--- import type { GetStaticPaths } from "astro"; import { getCollection, render } from "astro:content"; import Layout from "../../layouts/Layout.astro"; export const getStaticPaths = (async () => { const posts = await getCollection( "posts", ({ data }) => import.meta.env.DEV || !data.draft, ); return posts.map((post) => ({ params: { slug: post.id }, props: { post } })); }) satisfies GetStaticPaths; const { post } = Astro.props; const { Content } = await render(post); const day = new Intl.DateTimeFormat("en", { dateStyle: "long", timeZone: "UTC", }); ---

{post.data.title}

← all updates