page.tsx
1import { BlogList } from '@/components/blog-list'
2import { generateMeta } from '@/lib/generateMeta'
3import { getContent, sortContentByDate } from '@/lib/content'
4import { headers } from 'next/headers'
5
6export function generateMetadata() {
7 return generateMeta({
8 title: 'Blog',
9 path: '/blog',
10 })
11}
12
13export default function BlogPage() {
14 const allPosts = sortContentByDate(getContent('blog'))
15 const locale = headers().get('accept-language')?.split(',')[0] || 'en-US'
16
17 return <BlogList posts={allPosts} locale={locale} />
18}
19