29 lines
758 B
TypeScript
29 lines
758 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-16">
|
|
<header className="mb-20 text-center">
|
|
<h1 className="heading-xl text-ink mb-4">
|
|
blog
|
|
</h1>
|
|
<p className="text-ink-soft text-lg">
|
|
A sleek static blog with code and math.
|
|
</p>
|
|
</header>
|
|
<section>
|
|
<h2 className="font-sans text-2xl font-semibold tracking-tight text-ink mb-8">
|
|
Latest Posts
|
|
</h2>
|
|
<PostList posts={posts} />
|
|
</section>
|
|
</main>
|
|
</Template>
|
|
)
|
|
}
|