fix: fix calculating draft posts in totalPages

This commit is contained in:
satnaing
2022-12-02 23:27:18 +06:30
parent e0f93dab02
commit 19e34a0801
+1 -1
View File
@@ -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);
--- ---