blog.hangerthem.com/app/page.tsx

19 lines
No EOL
423 B
TypeScript

import Link from 'next/link';
import { getAllPostsMeta } from '@/lib/posts';
export default function BlogIndex() {
const posts = getAllPostsMeta();
return (
<main>
<h1>Blog</h1>
<ul>
{posts.map((post) => (
<li key={post.slug}>
<Link href={`/${post.slug}`}>{post.title}</Link>
<p>{post.description}</p>
</li>
))}
</ul>
</main>
);
}