Note that there are some explanatory texts on larger screens.

plurals
  1. POJekyll pagination for categories' posts
    primarykey
    data
    text
    <p>I have implemented <a href="http://bzbza.github.io/" rel="nofollow">this example-site</a>, 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). </p> <p>they don't query posts with standart method, like bellow</p> <pre><code>{% for post in site.categories %} {{the post}} { endfor } </code></pre> <p>BUT like this in every page (category) I loop so</p> <pre><code>{% 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 %} </code></pre> <p>I did so, because as written in jekyll's documentation, pagination can't work with quering posts via tags or categoires</p> <blockquote> <ul> <li>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. *</li> </ul> </blockquote> <p><a href="http://jekyllrb.com/docs/pagination/" rel="nofollow">source</a></p> <p>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.</p> <p>In home page paginations works as you can see</p> <p><a href="http://bzbza.github.io/" rel="nofollow">here is the site</a></p> <p><a href="https://github.com/bzbza/bzbza.github.com" rel="nofollow">here is the site's source</a></p> <p>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.</p> <p>How can I do pagination for the categories' posts ?</p> <p>In source there are in the folder categories and here - every category in its folder</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload