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

Add sorting option #2

Closed
leesei opened this issue Jul 15, 2015 · 3 comments
Closed

Add sorting option #2

leesei opened this issue Jul 15, 2015 · 3 comments

Comments

@leesei
Copy link
Member

leesei commented Jul 15, 2015

The sorting is hardcoded as

var posts = locals.posts.sort('-date');

Can it be made into hexo.config?

@iissnan
Copy link
Contributor

iissnan commented Oct 27, 2015

+1

@iissnan
Copy link
Contributor

iissnan commented Oct 28, 2015

I have created a pull request for this issue (#3).

Recently, I am working on adding sticky posts feature for theme NexT. My solution is to add a Front-matter, let's say sticky and resort posts via comparing this value when displaying in templates. Unfortunately, I found there was no chances to do the resort after this generator ran.

Although there is another solution, but I think change order in this way is more straightforward. It is also helpful for other theme developers and users.

Thanks,
Vi

@leesei
Copy link
Member Author

leesei commented Oct 29, 2015

Merged and pending publish.
Thanks.

@leesei leesei closed this as completed Oct 29, 2015
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

No branches or pull requests

2 participants