refactor media page to support pagination
This commit is contained in:
parent
468ff48bfe
commit
012acdb869
7 changed files with 131 additions and 25 deletions
|
@ -15,6 +15,7 @@ export const getStaticProps: GetStaticProps<{
|
|||
const posts = await getAllFilesFrontMatter('blog')
|
||||
const initialDisplayPosts = posts.slice(0, POSTS_PER_PAGE)
|
||||
const pagination = {
|
||||
page: 'blog',
|
||||
currentPage: 1,
|
||||
totalPages: Math.ceil(posts.length / POSTS_PER_PAGE),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue