fix post list

This commit is contained in:
DefectingCat
2022-09-07 15:26:17 +08:00
parent bcf2b540d3
commit 82d94f89c8

View File

@ -64,7 +64,7 @@ export const getStaticProps: GetStaticProps<{
return {
props: {
posts: posts.slice(page, PostPerPage),
posts: posts.slice((page - 1) * PostPerPage, PostPerPage + 1),
prev: page - 1,
next: page + 1,
total: Math.ceil(posts.length / PostPerPage),