mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2026-04-03 04:25:22 +00:00
blog post list
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content'
|
||||
import PostList from '../../components/PostList.astro'
|
||||
import Root from '../../layouts/Root.astro'
|
||||
import PageWithTitle from '../../layouts/PageWithTitle.astro'
|
||||
|
||||
const posts = (await getCollection('blog')).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf())
|
||||
---
|
||||
|
||||
<Root>
|
||||
<PageWithTitle title="Blog">
|
||||
<PostList posts={posts} />
|
||||
</Root>
|
||||
</PageWithTitle>
|
||||
|
||||
Reference in New Issue
Block a user