Enhancement: Enable custom sorting on integer fields
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m trying to define a custom sorting option for my content, which logically follows weights by folder and subfolder. Unfortunately, the only valid options for type
in frontMatter.content.sorting
seem to be date
and string
. This definition is invalid:
Describe the solution you’d like
I would like for this definition to be valid and order my content by weight from lowest integer value to highest:
"frontMatter.content.sorting": [
{
"id": "byWeight",
"title": "By Weight",
"name": "weight",
"order": "asc",
"type": "integer"
}
]
Describe alternatives you’ve considered
I can’t think of any, since Front Matter isn’t aware of how my static site generator will eventually order my content.
Additional context
N/A
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Custom sort order for an enum field - hibernate - Stack Overflow
One option is to sort by the ordinal of the enum. · A second option is to convert the enum to an Entity...
Read more >Sorting Modes and Custom Sorting | WPF Controls
Sorts a column's data by its edit values. To enable this mode, set the ColumnBase.SortMode property to ColumnSortMode.Value. Sorting by Display ...
Read more >Custom Sorting - WinForms GridView Control - Telerik UI for ...
Custom sorting is applied if user sorting is enabled by the EnableSorting or GridViewTemplate.EnableSorting properties. By default, sorting is enabled at all ...
Read more >Angular Data Grid: Row Sorting
This page describes how to sort row data in the grid and how you can customise that sorting to match your requirements.
Read more >Tableau Hack: How to Sort by Multiple Data Types
We have created a custom sort that allows the user to choose which measure or dimension to sort on. We have also added...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup! That fixed it for me! 😊 I’ll leave it on beta since I’m almost certainly going to stay out on the edge like this 😅
A new schema version was released on the beta docs, which should fix the schema issue.