Initial commit

This commit is contained in:
2025-05-06 23:09:47 +02:00
commit 89e98efb7d
79 changed files with 6948 additions and 0 deletions

26
app/page.tsx Normal file
View File

@ -0,0 +1,26 @@
import { getAllPosts } from "@/lib/api"
import { PostPreview } from "@/components/post-preview"
// Make sure this is a Server Component (default in App Router)
export default function Home() {
// Use synchronous data fetching to avoid suspense issues
const posts = getAllPosts()
// Sort posts by date (newest first)
const sortedPosts = posts.sort((a, b) => new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime())
return (
<div className="space-y-8 w-full">
<section>
<h2 className="sr-only">Blog posts</h2>
<ul className="space-y-6 w-full">
{sortedPosts.map((post) => (
<li key={post.slug} className="transition-all duration-300 w-full">
<PostPreview post={post} />
</li>
))}
</ul>
</section>
</div>
)
}