octopress / paginate

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

Support for paginating data collections. #39

Closed omarish closed 2 years ago

omarish commented 7 years ago

Summary

This branch adds support for paginating collections defined in site.data, and raises an exception if the specified collection could not be found.

Motivation

I've been relying on defining jekyll datasets in csv and yaml files. Since they are not actual collections and are instead defined in the _data directory, I would get an error when trying to paginate a data collection.

Now, you can define the data collection like this:

title: Links
paginate:
  collection: links
  per_page: 10

and the collection will be paginated correctly.

hannelita commented 7 years ago

👍 that would be super useful