0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-04 00:20:26 +03:00

Updated the main page and page structures

This commit is contained in:
2024-09-12 13:11:16 +00:00
parent 70fa9c2033
commit 4ba339984d
9 changed files with 132 additions and 76 deletions

View File

@ -1,18 +1,13 @@
---
import { getCollection } from "astro:content";
import Element from "../components/PostElement.astro";
import Layout from "../layouts/PageLayout.astro";
const posts = await getCollection("blog");
---
<Layout>
<ul>
{
posts.map((post) => (
<li>
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
</li>
))
}
</ul>
<section>
{posts.map((post) => <Element post={post} />)}
</section>
</Layout>