jekyll / jekyll-paginate

NO LONGER UNDER ACTIVE DEVELOPMENT as of Jekyll 3: Pagination Generator for Jekyll

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: "Reverse" pagination

Joshfindit opened this issue · comments

commented

For a blog, we expect that the newest post will be front-and-centre, but for other types of pages, we would expect the oldest to be first, and newer items to be on later pages.

Examples: Training material, ebook, story

Right now, if we have 8 posts:

  • 2014-01-02-Chapter-1.md
  • 2014-01-03-Chapter-2.md
  • 2014-01-04-Chapter-3.md
  • 2014-01-05-Chapter-4.md
  • 2014-01-06-Chapter-5.md
  • 2014-01-07-Chapter-6.md
  • 2014-01-08-Chapter-7.md
  • 2014-01-09-Chapter-8.md

Default pagination will return them in backwards order.

Changing Index.html to specify 'reversed' ( {% for post in paginator.posts %} to {% for post in paginator.posts reversed %} (with paginate: 3), jekyll-paginate returns the posts in this order:

  • 2014-01-07-Chapter-6.md
  • 2014-01-08-Chapter-7.md
  • 2014-01-09-Chapter-8.md

  • 2014-01-04-Chapter-3.md
  • 2014-01-05-Chapter-4.md
  • 2014-01-06-Chapter-5.md

  • 2014-01-02-Chapter-1.md
  • 2014-01-03-Chapter-2.md

Hi! This repo has been retired. Unfortunately this request is therefore out of scope. Thanks though!

I really wish there was a solution for this since its used by a lot of projects and most importantly by Github Pages.