jekyll / jekyll-paginate

NO LONGER UNDER ACTIVE DEVELOPMENT as of Jekyll 3: Pagination Generator for Jekyll
MIT License
111 stars 84 forks source link

WIP: Begin work on improved paginator. #22

Closed parkr closed 9 years ago

parkr commented 9 years ago

New configuration:

pagination:
  posts:
    per_page: 10 # used to be 'paginate'
    template: /blog/index.html # new! specify where we should look for your template
    permalink: /blog/:num # used to be 'paginate_path'
    filter_by:
      category: blog
  authors: # i'm a collection!
    per_page: 2
    # template: _authors/index.html (default)
    # permalink: /authors/:num/ (default)
    # by default, no filtering

Thoughts?

/cc @imathis @rodaine

parkr commented 9 years ago

Fixes #3, #4, #6, #11, #21.

kleinfreund commented 9 years ago

I can see this making a lot of people happy. This would allow for paginated categories and collections, right?

imathis commented 9 years ago

This really looks fantastic! One concern I have with Octopress Ink is that I'll be able to set a pagination template to files in a gem path. I know Jekyll is very strict about things being inside the source directory. I've managed to get around it for pages, includes, and layouts, but I remember pagination being pretty much impossible to change. Do you think the template configuration will allow that or am I going to need to do some money patching again? :)

imathis commented 9 years ago

Alrighty, I've just released octopress-paginate which seems to handle all of these features. Pagination configuration happens in the pagination template's YAML front-matter, but you can set the defaults from the _config.yml. It supports paginating posts by category or tags and supports pagination limits (for increased building speed).

Also it works with multilingual sites (via octopress-multilingual), so you can easily paginate posts from different languages separately.

sverrirs commented 7 years ago

Hey everybody, I know this is an old and closed issue but I wrote a pagination plugin for Jekyll that supports all of the features described in this post. Hoping that it might soon be a viable alternative for the old jekyll-paginate gem https://github.com/sverrirs/jekyll-paginate-v2