Expand description
Configurable file sorting for mbr.
Provides multi-level sorting by any field (title, filename, date, frontmatter), with configurable order (ascending/descending) and comparison type (string/numeric).
Uses a Schwartzian transform (decorate-sort-undecorate) to pre-extract sort keys, avoiding repeated field lookups and string allocations during comparisons.
Functions§
- folder_
entry - Builds one subfolder entry for a section/home page listing.
- folder_
index_ frontmatter - Frontmatter of every folder’s index note, keyed by the folder’s URL
(
/docs/) — the lookupfolder_entryneeds, built in one pass. - sort_
files - Sorts files in place according to the given sort configuration.
- sort_
folders - Sorts subfolder entries (from
folder_entry) the way the sidebar’ssortFolders()does, so a section page and the sidebar list folders in the same order.