rewdy / Pico-Pagination

Provides basic pagination for Pico.
27 stars 12 forks source link

Pagination w/ unexpected order / empty pages #8

Closed MatthiasKauer closed 3 years ago

MatthiasKauer commented 9 years ago

Hi, I'm tinkering with pico CMS. I installed the blank blog theme and then tried my hand on this plugin. I inserted the template code into the index.html of that plugin I am running into the following issue where the pagination doesn't do what I would expect. I have created 7 bogus blog pages in content/blog/. If I now limit pagination to 3, I receive an order 3-2-2 instead of 3-3-1 as I would expect. Limit 2 yields 2-2-1-2 and limit 1 delivers a bizarre empty page 6 when pages 7,8 still have content.

Ok, to give a fair description, I now pasted the template from your Readme into the default template and found sth that should help. The odd number is the Welcome page. It appears that your plugin counts it in while the blog theme then only lists the pages that have a date.

Kind regards, Matthias

MatthiasKauer commented 9 years ago

Ok, the default index.md that pico brings has an example meta Date: in the middle (not top) of the page. It appears that your plugin is processing that while the other one isn't. I don't understand the standard well enough to blame anyone and it appears to be almost a non-issue now that I figured it out.

rewdy commented 3 years ago

You've probably moved on, given that this was > 5 years ago, but for anyone who might find this searching, check out the pagination_filter_date config option.