mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 00:20:26 +03:00
Added Pagination component
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import Element from "../components/PostElement.astro";
|
||||
import Layout from "../layouts/BaseLayout.astro";
|
||||
|
||||
const posts = await getCollection("blog");
|
||||
posts.sort((a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime());
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<section>
|
||||
{posts.map((post) => <Element post={post} />)}
|
||||
</section>
|
||||
</Layout>
|
Reference in New Issue
Block a user