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

@erdgeist erdgeist commented Mar 13, 2015

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

@Kwpolska Kwpolska commented Mar 13, 2015

You could try merging the two options by using natsort.

Loading

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

@Kwpolska Kwpolska commented Mar 14, 2015

Please add:

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

Loading

@@ -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

@Kwpolska Kwpolska Mar 14, 2015

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?

Loading

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

@Kwpolska Kwpolska commented Mar 14, 2015

Merging and renaming prio to priority for readability.

Thank you for your contribution!

Loading

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

Successfully merging this pull request may close these issues.

None yet

3 participants