From d82fb3b552d20a279efdd9408042183cfa02fb48 Mon Sep 17 00:00:00 2001
From: schererleander <leander@schererleander.de>
Date: Thu, 25 Dec 2025 23:33:25 +0000
Subject: initial commit

---
 app/blog/page.tsx | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 app/blog/page.tsx

(limited to 'app/blog/page.tsx')

diff --git a/app/blog/page.tsx b/app/blog/page.tsx
new file mode 100644
index 0000000..abc3394
--- /dev/null
+++ b/app/blog/page.tsx
@@ -0,0 +1,34 @@
+
+import { format, parseISO } from 'date-fns'
+import { allPosts } from 'contentlayer/generated'
+import Link from 'next/link'
+
+export default function BlogPage() {
+  const posts = allPosts.sort((a, b) => compareDesc(new Date(a.date), new Date(b.date)))
+
+  return (
+    <div className="max-w-2xl mx-auto py-12">
+      <h1 className="text-3xl font-bold mb-8">Blog</h1>
+      <div className="space-y-8">
+        {posts.map((post) => (
+          <article key={post._id} className="group relative flex flex-col items-start">
+            <h2 className="text-xl font-semibold tracking-tight">
+              <Link href={post.url} className="hover:underline">
+                {post.title}
+              </Link>
+            </h2>
+            <time dateTime={post.date} className="text-sm text-muted-foreground mb-2">
+              {format(parseISO(post.date), 'LLLL d, yyyy')}
+            </time>
+          </article>
+        ))}
+      </div>
+    </div>
+  )
+}
+
+function compareDesc(a: Date, b: Date) {
+  if (a > b) return -1
+  if (a < b) return 1
+  return 0
+}
-- 
cgit v1.3.1

