22 lines
608 B
Plaintext
22 lines
608 B
Plaintext
---
|
|
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
import PageHeaderCard from '@/components/PageHeaderCard.astro';
|
|
import { getAllPosts } from '@/lib/posts';
|
|
|
|
const posts = getAllPosts();
|
|
---
|
|
|
|
<BaseLayout title="归档">
|
|
<section class="content-wrap narrow">
|
|
<PageHeaderCard title="归档" subtitle={`共 ${posts.length} 篇文章`} />
|
|
<div class="archive-list">
|
|
{posts.map((post) => (
|
|
<a href={post.href}>
|
|
<time datetime={post.date.toISOString()}>{post.dateText}</time>
|
|
<span>{post.title}</span>
|
|
</a>
|
|
))}
|
|
</div>
|
|
</section>
|
|
</BaseLayout>
|