jekyll-theme-yat
jekyll-theme-yat copied to clipboard
reads pagination also from include and layout. remove posts subfield.
I edited pagination.html to read the paginator parameter from a number of places. It really can't read from page because of all the nested layouts.
I also had to flatten it and pass the posts array directly. Otherwise, I could not figure out how to send a filtered dynamic list of posts to it. So now I could call it like this:
{% assign posts_no_posters = site.categories.CAT | where_exp: "post", "post.categories != 'posters'" %}
{% include views/pagination2.html paginator=posts_no_posters %}
I searched in your code to see if there was a specific use case for your version. Does this break compatibility with code that you have?