Skip to content

Commit

Permalink
fix: fix calculating draft posts in totalPages
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Dec 2, 2022
1 parent e0f93da commit 19e34a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/posts/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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);
---
Expand Down

0 comments on commit 19e34a0

Please sign in to comment.