I add a 'modified' date to my posts and make them sorted from new to old by modified date instead of posted date. Make people notice the update of posts.
I have ymal for posts , like this:
---
title: Mytitle
posted: 2020-06-29
modified: 2020-07-29
....
And the following code works well:
{% assign my_sorted_list = site.posts | sort:"modified" %}
{% for post in my_sorted_list %}
...
{% endfor %}
But when I turn on the jekyll-paginate in my _config.yml, it is sorted by the posted date again.
Is there any way I can sort by modified date when I turn on the pagination? I have tried a few methods but nothing seems to work. Please help!
I suppose this function is not supported. Because I found this pull request. This request aims to that paginator can sort posts by modified date. And this request is not merged yet.