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 two parameters to post-list directive to allow for sorting posts #1635

Merged
merged 5 commits into from Mar 14, 2015

Conversation

erdgeist
Copy link
Contributor

I have added the sort and sortnumparameters to the post-list directive, so the order of posts can be changed from their default. sort sorts alphabetically, sortnum numerically, so I can either sort all posts by their title or manually put priorities to posts to set their order.

@Kwpolska
Copy link
Member

You could try merging the two options by using natsort.

@Kwpolska Kwpolska added this to the v7.3.2 milestone Mar 13, 2015
@Kwpolska
Copy link
Member

Please add:

  • erdgeist at erdgeist dot org to your github e-mails,
  • yourself to AUTHORS.txt,
  • a description of the change to CHANGES.txt

@@ -1659,6 +1659,10 @@ The following options are recognized:
Reverse the order of the post-list.
Defaults is to not reverse the order of posts.

* ``sort``: string
Sort post list by one of each post's attributes, usually ``title`` or a custom ``prio``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it priority?

@Kwpolska Kwpolska self-assigned this Mar 14, 2015
@Kwpolska
Copy link
Member

Merging and renaming prio to priority for readability.

Thank you for your contribution!

@Kwpolska Kwpolska merged commit 95dfe85 into getnikola:master Mar 14, 2015
Kwpolska added a commit that referenced this pull request Mar 14, 2015
Add [a] parameter to post-list directive to allow for sorting posts
Kwpolska added a commit that referenced this pull request Mar 14, 2015
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@erdgeist erdgeist deleted the sorted-post-lists branch March 14, 2015 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants