--- import { getCollection, render } from 'astro:content'; import type { GetStaticPaths } from 'astro'; import Base from '../../layouts/Base.astro'; import Button from '../../components/Button.astro'; import Label from '../../components/Label.astro'; export const getStaticPaths = (async () => { const all = (await getCollection('projects')).sort((a, b) => a.data.order - b.data.order); return all.map((entry, i) => ({ params: { slug: entry.id }, props: { entry, prev: all[i - 1], next: all[i + 1], n: i + 1 }, })); }) satisfies GetStaticPaths; const { entry, prev, next, n } = Astro.props; const { Content } = await render(entry); const d = entry.data; ---
← ALL PROJECTS

{d.title}

{d.summary}

{String(n).padStart(2, '0')}
{d.domainLabel}
{d.when}
{d.tech.length > 0 &&
{d.tech.join(' · ')}
}
{ d.links.length > 0 && (
{d.links.map((l) => )}
) }
{prev ? : } {next ? : }