--- import { getCollection } from "astro:content"; import { slugify } from "@lib/utils"; import SectionTitle from "@components/SectionTitle.astro"; import MainLayout from "@layouts/MainLayout.astro"; import Token from "@components/Token.astro"; import ProjectCard from "@components/ProjectCard.astro"; const projects = (await getCollection("projects")).sort( (a, b) => b.data.date.valueOf() - a.data.date.valueOf() ); const types = [...new Set(projects.map((project) => project.data.type))]; ---
Recent Projects
All { types.map((type) => ( {type} )) }
{ projects.map((project, index) => { return ( ); }) }