feat(docs): improve documentation, add icons, reorganize

This commit is contained in:
Elian Doran
2025-03-29 13:02:03 +02:00
parent 5ae6b18762
commit 0982a0e503
172 changed files with 4995 additions and 4421 deletions

View File

@@ -0,0 +1,24 @@
# Sorting Notes
## Sorting Notes
You can sort notes by right-clicking the parent note in the note tree and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note
## Automatic/Permanent Sorting
Child notes can be automatically sorted by attaching specific [labels](../../Advanced%20Usage/Attributes.md) to the parent note:
* `#sorted`: Enables sorting. Can optionally include the name of the note's property/label for sorting criteria (details below).
* `#sortDirection`: By default, sorting is ascending. Set this to `desc` to sort in descending order.
* `#sortFoldersFirst`: Notes with children will be sorted to the top.
Sorting is done by comparing note properties or specific labels on child notes. There are four sorting levels, with the first having the highest priority. Lower priority levels are applied only if higher priority comparisons result in equality.
1. **Top Label Sorting**: Child notes with the `#top` label will appear at the top of the folder.
2. **Bottom Label Sorting**: (Introduced in Trilium 0.62) Child notes with the `#bottom` label will appear at the bottom of the folder.
3. **Property/Label-Based Sorting**: Sorting is based on the parent note's `#sorted` label:
* **Default Sorting**: If `#sorted` has no value, notes are sorted alphabetically.
* **Property Sorting**: If `#sorted` is set to `title`, `dateModified`, or `dateCreated`, notes are sorted based on the specified property.
* **Label Sorting**: If `#sorted` has any other value, this value is treated as the name of a child note's label, and sorting is based on the values of this label. For example, setting `#sorted=myOrder` on the parent note and using `#myOrder=001`, `#myOrder=002`, etc., on child notes.
4. **Alphabetical Sorting**: Used as a last resort when other criteria result in equality.
All comparisons are made string-wise (e.g., "1" < "2" or "2020-10-10" < "2021-01-15", but also "2" > "10").