diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro index 63ff0fe..60c3d9a 100644 --- a/src/pages/posts/[slug].astro +++ b/src/pages/posts/[slug].astro @@ -54,7 +54,7 @@ const posts = await Astro.glob("../../contents/*.md"); const sortedPosts = getSortedPosts(posts); -const totalPages = getPageNumbers(posts.length); +const totalPages = getPageNumbers(sortedPosts.length); const currentPage = slug && !isNaN(Number(slug)) && totalPages.includes(Number(slug))