Open JacksonChen666 opened 2 years ago
I found this (scroll a bit down for total_posts
description) which means the behavior is correct to the description, just not to my expectation (expected 69, got 64 instead of 69 with the set offset of 5) and probably not the jekyll documentation (for v1).
I don't see an offset option for v1 pagination, so I don't think this issue can be dismissed because of being v1 backwards compatibility. Though, the solution could be a backwards-incompatible change.
Workaround (replace all {{ paginator.total_posts }}
with): {{ paginator.total_posts | plus: site.pagination.offset }}
When an offset is set,
paginator.total_posts
returns the total posts minus the offset, which does not represent the actual amount of posts.