[SOLVED] Composite stream by looping over collections

Hi all.

I want to turn my home page into a composite stream, full posts of every type (so normal posts, but also other “posts” from collections as well). However there are a few condition I’m looking to fulfill.

One of said conditions being I don’t want to output every single post on one page, obviously there will be a "limit: " filter in one of the liquid tags, but I’m not sure which tag that would be. There will be pagination to access the rest (but perhaps using the limit filter is unnecessary with pagination involved?).

I also want to group and sort all output by the post/document date in reverse chronological order.

Lastly, and this is what is causing most of my grief, is I wish to do all this but skipping certain collections (a folder/collection of webmentions for instance).

I’ve been banging my head against my desk the last little while trying to figure this out. Help would be greatly appreciated.

If you’re looping over posts without pagination you’d apply the limit filter to your for loop… e.g. {% for posts in site.posts | limit: 10 %}

Though since you’re paginating, that will handle the limits.
The default (and deprecated Jekyll pagination plugin) won’t get you very far. Take a look at jekyll-paginate-v2 as it does a lot it not all of what you want.

Thanks, I guess I should set that up first.

The bigger issue I think is how I could theoretically group posts and certain collections together and sort the output by their date/time? I can imagine how to do a separate stream or section for each, but I would like it (if possible) to output them intermingled chronologically.

Check the plugin docs. It does a lot.

Holy shazbot. Ok, I’m impressed, that looks like it will do it.