website/src/pages/projects/index.astro
2024-04-03 14:27:48 +02:00

16 lines
457 B
Plaintext

---
import { getCollection } from "astro:content";
import Layout from "@layouts/Layout.astro";
import { getLocale } from "astro-i18n-aut";
import { filterCollection } from "@i18n/utils";
import HeroCard from "@components/HeroCard.astro";
const locale = getLocale(Astro.url);
const pages = await getCollection("projects");
const posts = filterCollection(pages, locale);
---
<Layout title="Dude">
{posts.map((post) => <HeroCard post={post} />)}
</Layout>