Skip to content

Post sort fix#2262

Merged
NoahDragon merged 3 commits intohexojs:masterfrom
KernelPanicAUS:post_sort_fix
Dec 2, 2016
Merged

Post sort fix#2262
NoahDragon merged 3 commits intohexojs:masterfrom
KernelPanicAUS:post_sort_fix

Conversation

@KernelPanicAUS
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member

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

@KernelPanicAUS
Copy link
Copy Markdown
Contributor Author

Done :)

@coveralls
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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