Currently, users are unable to customize the way FolderPage and TagPage sort files, and can only sort by byDateAndAlphabetical. Users may sometimes need custom sorting methods, such as sorting by alphabetical order, custom key in frontmatter, or even manually specifying the order(#1227).
This pull request allows them to accept a sorting function to override the original sorting behavior.
Users can pass in a sorting function in quartz.config.ts. An example (sorting alphabetically) is:
Currently, users are unable to customize the way
FolderPage
andTagPage
sort files, and can only sort bybyDateAndAlphabetical
. Users may sometimes need custom sorting methods, such as sorting by alphabetical order, custom key in frontmatter, or even manually specifying the order(#1227).This pull request allows them to accept a sorting function to override the original sorting behavior.
Users can pass in a sorting function in
quartz.config.ts
. An example (sorting alphabetically) is:Full example is on example branch.