octopress / paginate

A simple paginator for Jekyll sites.
MIT License
105 stars 37 forks source link

`reversed` setting not working #33

Closed halcarleton closed 8 years ago

halcarleton commented 8 years ago

I'm trying to paginate a collection using octopress-paginate but I can't get the order to reverse.

Here is an example of what is happening:

_my_collection/2016-09-17-a.md


---
title: a
date: 2016-09-17 13:00:00

---

_my_collection/2016-09-18-b.md


---
title: b
date: 2016-09-18 14:30:00

---

my_collection/index.html


---
layout: default
title: "reverse test"
paginate:
  collection: my_collection
  reversed: true

---
{% for post in paginator.my_collection %}
  {{ post.title }}
{% endfor %}

result

ab

If I change reversed to false the result is the same. If I move the config into my yml file there is still no change.


octopress-paginate 1.1.2 jekyll 3.2.1 node 6.6.0 ubuntu 16.04

ow commented 8 years ago

Damn, I have this problem too. No idea what's going on.

aitortomas commented 8 years ago

I think that release 1.1.2 does not contain the code for reversed collections. On the other hand, the current master branch does contain the code for reversed collections. Install the gem from the source and it should work

gem 'octopress-paginate', :git => 'git://github.com/octopress/paginate.git'

I understand that, if you are using jekyll v3, you are also getting the deprecation warnings, installing from source should also remove those.

ow commented 8 years ago

Ahh thanks so much @aitortomas – exactly it. Was confusing since it was in the repo but not the latest gem. All sorted and working here!

parkr commented 8 years ago

Just released v1.2.0.