[SOLVED] Paginate page (.md) filtering by category?

The official paginate plugins has a bunch of limitations: be used only once, only on index.html, and only for posts. Are any alternatives?

I have two pages for presenting the “2” blogs. Both blogs are just simple posts with different categories.

Blog 1 =>

    • is a page (_pages/blog1.md) with layout: blog that makes use of _layouts/blog.html, where the posts are filtered by {% for post in site.categories.categoryOne %}.

Blog 2 =>

    • is also a page (_pages/blog2.md), but with layout: page and right after the front matter, there’s the code to iterate over posts and filter by category ({% for post in site.categories.categoryTwo %}.

I would like to paginate both blogs.

Blog1 which is just a normal blog, could use the Jekyll-paginate plugin, but not if it needs to filter categories…

Blog2 would need something else. On the docs, I’ve found a link to Jekyll-paginate-category, but I’m not sure works in markdown file, and the documentation was way too short for a noob like me… :stuck_out_tongue:

Any solution would be appreciated, however, since this problem has grown up organically with the site, I just kept adding layers upon layers, and I might be complicating way more than necessary. Any tips on how to re-approach the case would also be welcome.

I would look at jekyll-paginate-v2. It’s feature rich (can paginate categories, tags, collections, etc.) and is actively being developed.

2 Likes

Thanks, @mmistakes! It’s really feature rich! I’ll mark this post as “solved”.

However, there is an issue with markdown not being rendered. If anybody is following this, just take a look at the link above, the plugin’s creator is really attentive and the issue will soon be solved as well.