Skip to content

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

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

You must be logged in to vote

Copying the original answer from Issues

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…

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
1 participant