Skip to content

Enhancement: Enable custom sorting on integer fields #402

@michaeltlombardi

Description

@michaeltlombardi

Is 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions