Skip to content

How to apply settings to all folders and files except root folder? #48

Answered by SebastianMC
ocreturner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

the short answer is: specify the sorting rule for the root folder explicitly

---
sorting-spec: |
 target-folder: //*
 /:files
  > a-z
 /folders
  > a-z

 target-folder: /
 sorting: standard
---

Explanation: specifying the target folder by name has always a higher priority than any wildard-pattern-based sorting specification.

In your specific example, the line target-folder: //* sets the sorting rules for all folders (including root) of the vault. Then, adding a line target-folder: / sets the sorting rules for the root / folder specifically, overriding the pattern-based configuration.

I've used the sorting: standard in the example - in result, the files and notes in the root folder…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SebastianMC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #10 on January 19, 2023 14:39.