Add sort + pagination controls for blog and tag overviews

This commit is contained in:
2025-11-17 21:20:08 +08:00
parent b47549437a
commit 1fc34e2ef6
3 changed files with 136 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
import { getAllPostsSorted } from '@/lib/posts';
import { PostListItem } from '@/components/post-list-item';
import { PostListWithControls } from '@/components/post-list-with-controls';
export const metadata = {
title: '所有文章'
@@ -13,11 +13,7 @@ export default function BlogIndexPage() {
<h1 className="text-lg font-semibold text-slate-900 dark:text-slate-50">
</h1>
<ul className="space-y-3">
{posts.map((post) => (
<PostListItem key={post._id} post={post} />
))}
</ul>
<PostListWithControls posts={posts} />
</section>
);
}