From 67eb91ad6dccf2a14e3f8d3b285c75d251322973 Mon Sep 17 00:00:00 2001
From: mihna123 <mihailonvojinovic@gmail.com>
Date: Mon, 8 Jun 2026 14:19:32 +0200
Subject: feat(blogs): implement blogging functionality

- Implement static blog generation from markdown files
---
 src/app/blogs/page.tsx | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 src/app/blogs/page.tsx

(limited to 'src/app/blogs/page.tsx')

diff --git a/src/app/blogs/page.tsx b/src/app/blogs/page.tsx
new file mode 100644
index 0000000..8fa3c42
--- /dev/null
+++ b/src/app/blogs/page.tsx
@@ -0,0 +1,39 @@
+import { type Blog, getAllBlogs } from '@/lib/blogs/api';
+import Link from 'next/link';
+
+const BlogCard = ({ blog }: { blog: Blog }) => {
+  return (
+    <div className="space-y-2">
+      <Link
+        href={`/blogs/${blog.slug}`}
+        className="link text-3xl font-semibold"
+      >
+        {blog.title}
+      </Link>
+      <p>
+        by {blog.author.name} ~ {blog.date.toLocaleDateString()}
+      </p>
+      <p className="text-lg">{blog.excerpt}</p>
+      <Link href={`/blogs/${blog.slug}`} className="link">
+        READ MORE &gt;
+      </Link>
+    </div>
+  );
+};
+
+export default function BlogPage() {
+  const blogs = getAllBlogs();
+  // newest first
+  blogs.sort((a, b) => b.date.getTime() - a.date.getTime());
+
+  return (
+    <section className="mt-10 flex justify-center">
+      <div className="w-5xl space-y-4">
+        <h1 className="text-4xl font-bold">Free Invoice Generator Blogs</h1>
+        {blogs.map((b) => (
+          <BlogCard key={b.slug} blog={b} />
+        ))}
+      </div>
+    </section>
+  );
+}
-- 
cgit v1.3.1

