Initial commit

This commit is contained in:
2025-11-17 15:28:20 +08:00
commit 0c64279e34
100 changed files with 23827 additions and 0 deletions

42
app/page.tsx Normal file
View File

@@ -0,0 +1,42 @@
import Link from 'next/link';
import { getAllPostsSorted } from '@/lib/posts';
export default function HomePage() {
const posts = getAllPostsSorted().slice(0, 5);
return (
<section className="space-y-6">
<div>
<h1 className="text-3xl font-bold"> Your Name</h1>
<p className="mt-2 text-gray-600 dark:text-gray-300">
Blog
</p>
</div>
<div>
<h2 className="text-xl font-semibold"></h2>
<ul className="mt-3 space-y-2">
{posts.map((post) => (
<li key={post._id}>
<Link href={post.url} className="hover:underline">
{post.title}
</Link>
{post.published_at && (
<span className="ml-2 text-xs text-gray-500">
{new Date(post.published_at).toLocaleDateString('zh-TW')}
</span>
)}
</li>
))}
</ul>
<Link
href="/blog"
className="mt-4 inline-block text-sm text-blue-600 hover:underline"
>
</Link>
</div>
</section>
);
}