import { type Metadata } from 'next' import { Card } from '@/components/Card' import { SimpleLayout } from '@/components/SimpleLayout' import { type ArticleWithSlug, getAllArticles } from '@/lib/articles' import { formatDate } from '@/lib/formatDate' function Article({ article }: { article: ArticleWithSlug }) { return (
{article.title} {formatDate(article.date)} {article.description} Read article {formatDate(article.date)}
) } export const metadata: Metadata = { title: 'Articles', description: 'All of my long-form thoughts on programming, leadership, product design, and more, collected in chronological order.', } export default async function ArticlesIndex() { let articles = await getAllArticles() return (
{articles.map((article) => (
))}
) }