refactor: use metadata export for seo

This commit is contained in:
Timothy Lin
2023-07-08 21:03:46 +08:00
parent 1dfa80e8bd
commit b6dac68f61
10 changed files with 227 additions and 91 deletions

View File

@@ -2,9 +2,12 @@ import ListLayout from '@/layouts/ListLayout'
import { sortedBlogPost } from 'pliny/utils/contentlayer'
import { allBlogs } from 'contentlayer/generated'
import type { Blog } from 'contentlayer/generated'
import { genPageMetadata } from 'app/seo'
const POSTS_PER_PAGE = 5
export const metadata = genPageMetadata({ title: 'Blog' })
export default function BlogPage() {
const posts = sortedBlogPost(allBlogs) as Blog[]
const pageNumber = 1