feat: add some stuff
This commit is contained in:
25
src/pages/projects/index.astro
Normal file
25
src/pages/projects/index.astro
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
import { filterCollection } from "@i18n/utils";
|
||||
|
||||
const locale = getLocale(Astro.url);
|
||||
const pages = await getCollection("projects");
|
||||
const posts = filterCollection(pages, locale);
|
||||
---
|
||||
|
||||
<Layout title="Dude">
|
||||
<hr />
|
||||
{
|
||||
posts.map((post) => (
|
||||
<>
|
||||
<>
|
||||
<a href={"projects/" + post.slug.split("/")[0]}>{post.data.title}</a>
|
||||
<br />
|
||||
</>
|
||||
</>
|
||||
))
|
||||
}
|
||||
<hr />
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user