Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post sort fix #2262

Merged
merged 3 commits into from
Dec 2, 2016
Merged

Post sort fix #2262

merged 3 commits into from
Dec 2, 2016

Conversation

KernelPanicAUS
Copy link
Contributor

I've noticed that the 'next' and 'previous' page attributes were back to front.
This was due to how the posts were sorted in the post generator.
Tests have been updated accordingly.

Updated tests to check for every posts prev and next properties.
@coveralls
Copy link

coveralls commented Nov 13, 2016

Coverage Status

Coverage remained the same at 97.132% when pulling a2a8083 on KernelPanicAUS:post_sort_fix into dcd238f on hexojs:master.

@NoahDragon
Copy link
Member

Could you please remove yarn.lock or add it to the gitignore?

@KernelPanicAUS
Copy link
Contributor Author

Done :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.132% when pulling fcf38b0 on KernelPanicAUS:post_sort_fix into dcd238f on hexojs:master.

1 similar comment
@coveralls
Copy link

coveralls commented Nov 15, 2016

Coverage Status

Coverage remained the same at 97.132% when pulling fcf38b0 on KernelPanicAUS:post_sort_fix into dcd238f on hexojs:master.

@NoahDragon
Copy link
Member

NoahDragon commented Apr 20, 2017

After rethinking about this issue, I think this may be varied based on the perspective of view on previous and next.

Let's say we have several posts from newest to oldest:

New<--------------------------------->Old
                     Next<--|-->Prev                         `posts.sort('date')`
                     Prev<--|-->Next                         `posts.sort('-date')`

The Prev and Next do not have any time directions, either way is okay.

However, posts.sort('-date') has used since Hexo 2.0. I'm going to revert this change as it is starting to break existing themes.

NoahDragon added a commit that referenced this pull request Apr 20, 2017
NoahDragon added a commit that referenced this pull request Apr 20, 2017
* Revert #2262 Changes

* Revert 2494 opencollective (#2527)

* Revert "Activating Open Collective (#2494)"

This reverts commit 657593c.

* Update post.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants