I have implemented this example-site, it's not a real site, just an example, I did categories list in the right side of the site, they're actually pages, every one as one category (there was no used plugins for this).
they don't query posts with standart method, like bellow
{% for post in site.categories %}
{{the post}}
{ endfor }
BUT like this in every page (category) I loop so
{% for post in site.posts %}
{% assign cat = page.title %}
{% assign post_cat = post.categories | join: '-' %}
{% if post_cat contains cat %}
here goes the posts...
{% endif %}
{% endfor %}
I did so, because as written in jekyll's documentation, pagination can't work with quering posts via tags or categoires
- Pagination does not support tags or categories Pagination pages through every post in the posts variable regardless of variables defined in the YAML Front Matter of each. It does not currently allow paging over groups of posts linked by a common tag or category. *
I thought if every category (in this case every page - index.html) has its own index.html, Ican paginate categories, but unfortunately I can't.
In home page paginations works as you can see
I don't want use plugin for this, because all things like "related posts via tags", "every post categories linked to its categories page", and the other things I did without plugins, and so can write posts directly from github.
How can I do pagination for the categories' posts ?
In source there are in the folder categories and here - every category in its folder