CHH / jekyll-prismic

Add Prismic.io content to your Jekyll site
MIT License
31 stars 5 forks source link

Orderings not working #9

Closed evaferreira closed 7 years ago

evaferreira commented 7 years ago

I know this is an old repo but perhaps you can help me!

I'm trying to order posts but it doesn't seem to have any effect on the returned collection. I'm using:

collections:
        posts:
            # Query the documents by type
            type: post
            # Collection name
            form: posts
            permalink: /news/:uid/
            orderings: '[my.post.date]'
            # Layout file for this collection
            layout: post.html
            output: true

It works ok when I try it on the Prismic.io Browser API but no effect at all on how Jekyll displays them and no error message :(

If you have any idea on how to fix this I'll be very thankful!

evaferreira commented 7 years ago

Short update: It works now 💃

If anyone has the same issue, here's my solution:

Turns out the gem is not 100% updated on rubygems, so when using gem "jekyll-prismic" you don't get the last commits (orderings). Instead of using that you link to the repository which is 100% updated gem "jekyll-prismic", :git => 'https://github.com/CHH/jekyll-prismic.git'

Happy coding! 😀