mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
add static path generate
This commit is contained in:
@ -1,10 +1,14 @@
|
||||
import PostCard from 'app/blog/post-card';
|
||||
import PostCardLoading from 'app/blog/post-card-loading';
|
||||
import Pagination from 'components/rua/rua-pagination';
|
||||
import { postLists, PostPerPage } from 'lib/posts';
|
||||
import { getPostListPath, postLists, PostPerPage } from 'lib/posts';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { Fragment, Suspense } from 'react';
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return await getPostListPath();
|
||||
}
|
||||
|
||||
export default async function Page({ params }: { params: { page: string } }) {
|
||||
const page = Number(params.page);
|
||||
if (!page) notFound();
|
||||
@ -36,4 +40,4 @@ export default async function Page({ params }: { params: { page: string } }) {
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user