mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
fix: fix calculating draft posts in totalPages
This commit is contained in:
@@ -9,7 +9,7 @@ const posts = await Astro.glob<Frontmatter>("../../contents/**/*.md");
|
||||
|
||||
const sortedPosts = getSortedPosts(posts);
|
||||
|
||||
const totalPages = getPageNumbers(posts.length);
|
||||
const totalPages = getPageNumbers(sortedPosts.length);
|
||||
|
||||
const paginatedPosts = sortedPosts.slice(0, SITE.postPerPage);
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user