Waypoint
Waypoint copied to clipboard
Sort by metadata key
Sort by note metadata key
Resolves: #38
Overview
This pull request introduces the functionality that allows users to manually order the notes listed in their Waypoint by specifying a priority in the note's metadata. By default, notes are listed alphabetically, but this change allows notes to be listed in order of priority instead. The version has been bumped to 1.5.0 to indicate the new feature introduction.
Changes
README.md:
- Added a new section "Ordering Notes on Waypoint" explaining how users can order their notes in the generated waypoints by specifying
waypointPriorityin the frontmatter of their notes.
main.ts:
- The settings interface
WaypointSettingswas updated with a new propertywaypointPriorityKey. - A new method
updateAncestorWaypointsis introduced to replaceupdateParentWaypointfor updating all ancestor waypoints of a file or folder. This was necessary as inside folder notes priority change would change waypoints in higher levels. - Introduced
getWaypointPriorityfunction to fetch the priority of a note from its metadata, which supports both regular notes and folder notes. - Implemented a new sorting method
sortWithPriorityto sort the nodes considering their priority.
WaypointSettingsTab:
- A new setting field is added to let users set the frontmatter key for note order priority.
I definitely would love that.
Would also love to see this!