-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add ability to sort by frontmatter parameters #3022
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
Conversation
bep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is useful, and if you can address my comments and add a line or two in the docs, I will merge.
|
This should address the remarks you had earlier, @bep. Let me know how else I can help. |
bep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it looks right. A line in the doc and this is good o go.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This allows users to sort by the value of a specified frontmatter key, including anything that would otherwise be available in
.Params. Comparisons (and thus the resulting sorting) are done on a string basis, so, for example,xyz123comes before and not afterxyz23.This is useful for general-purpose sorting for which
weightis either not sufficient or where it duplicates information that's already present in the frontmatter. See discussions here.If the committers are happy with this implementation, I'll also add the correspondingly necessary documentation for this feature.