feat: add fuzzy post search

This commit is contained in:
opencode
2026-06-03 11:01:56 -05:00
parent a897894791
commit 755a65d9a6
2 changed files with 239 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import { getPosts } from '@/lib/posts'
import { PostCard } from '@/components/blog/PostCard'
import { PostSearch } from '@/components/blog/PostSearch'
import Template from '../template'
export const metadata = { title: 'Posts' }
@@ -13,14 +13,7 @@ export default async function PostsPage() {
<h1 className="heading-xl text-ink mt-0 mb-12">
Posts
</h1>
<div className="space-y-12">
{posts.map((post) => (
<PostCard key={post.slug} {...post} />
))}
{posts.length === 0 && (
<p className="text-ink-soft">No posts yet.</p>
)}
</div>
<PostSearch posts={posts} />
</main>
</Template>
)