Skip to content

Commit

Permalink
fix: page count on archive (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticLampyrid committed Feb 18, 2024
1 parent a7940a6 commit b963ff0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions layout/archive.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@
<div id="archives">
<div class="post-block archive post" style="margin-left: 2em;">
<h3 class="archive-page-counter"><%- __('archive_count', () => {
let pCount = 0;
page.posts.each((p) => {
if (p.title) {
pCount++;
}
});
return pCount;
return site.posts.filter((post) => { return !!post.title }).length;
}) %></h3>
<div class="posts-collapse">
<% let year; %>
Expand Down

0 comments on commit b963ff0

Please sign in to comment.