Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Begin work on improved paginator. #22

Closed
wants to merge 1 commit into from
Closed

Conversation

parkr
Copy link
Member

@parkr parkr commented Jan 25, 2015

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
Copy link
Member Author

parkr commented Jan 25, 2015

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

@parkr parkr added this to the 2.0 milestone Jan 25, 2015
@kleinfreund
Copy link

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

@imathis
Copy link

imathis commented Jan 25, 2015

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
Copy link

imathis commented Feb 11, 2015

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants