Files
public-blog/app/page.tsx

26 lines
642 B
TypeScript

import { getPosts } from '@/lib/posts'
import { PostList } from '@/components/blog/PostList'
import Template from './template'
export default async function HomePage() {
const posts = await getPosts()
return (
<Template>
<main className="max-w-4xl mx-auto px-6 py-12">
<header className="mb-16 text-center">
<p className="text-ink-soft text-lg">
A sleek static blog with code and math.
</p>
</header>
<section>
<h1 className="heading-xl text-ink mb-8">
Latest Posts
</h1>
<PostList posts={posts} />
</section>
</main>
</Template>
)
}