feat(blog): add /blog routes with dedicated editorial layout

This commit is contained in:
kbot
2026-07-06 20:22:27 -05:00
parent ff58dd000c
commit 5b3e24ca78
5 changed files with 210 additions and 0 deletions

30
app/blog/page.tsx Normal file
View File

@@ -0,0 +1,30 @@
import { getPosts } from '@/lib/posts'
import { PostSearch } from '@/components/posts/PostSearch'
export const metadata = { title: 'Field Notes' }
export default async function PostsPage() {
const posts = await getPosts()
return (
<>
<header className="mb-10 border-b border-border pb-8">
<h1 className="heading-xl m-0 text-ink">
Posts
</h1>
</header>
{posts.length > 0 ? (
<PostSearch posts={posts} />
) : (
<section className="empty-state" aria-label="No posts published">
<p className="font-mono text-xs uppercase tracking-[0.22em] text-ink-soft">No posts yet</p>
<h2 className="heading-sm m-0 text-ink">The archive is empty.</h2>
<p className="m-0 max-w-xl text-sm leading-6 text-ink-soft">
Publish an MDX post to populate this list and enable archive search.
</p>
</section>
)}
</>
)
}