mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +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 sortedPosts = getSortedPosts(posts);
|
||||||
|
|
||||||
const totalPages = getPageNumbers(posts.length);
|
const totalPages = getPageNumbers(sortedPosts.length);
|
||||||
|
|
||||||
const paginatedPosts = sortedPosts.slice(0, SITE.postPerPage);
|
const paginatedPosts = sortedPosts.slice(0, SITE.postPerPage);
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user