feat: some shit

This commit is contained in:
2024-03-26 16:36:18 +01:00
commit f0129ecc76
31 changed files with 5074 additions and 0 deletions

View File

@ -0,0 +1,30 @@
---
import { getCollection } from 'astro:content';
const pages = await getCollection('blog');
import Layout from '../../layouts/Layout.astro';
import { getLocale } from "astro-i18n-aut";
import { filterCollection } from '../../i18n/utils';
const locale = getLocale(Astro.url);
const posts = filterCollection(pages, locale);
console.log({posts, locale});
---
<Layout title="Dude">
<hr/>
{
posts.map((post) => (
<>
<a href={"blog/"+post.slug.split("/")[0]}>
{post.data.title}
</a><br/>
</>
))
}
<hr/>
</Layout>