joekrill / silverbullet-treeview

SilverBullet TreeView plug
MIT License
41 stars 11 forks source link

Add option to use a custom base directory instead of the root of the space #10

Closed simone-viozzi closed 4 months ago

simone-viozzi commented 8 months ago

To avoid confusion with the default silverbullet folders, i have everything in /notes.

I would like to set this folder as root for the TreeView.

joekrill commented 4 months ago

This can sort of be handled with the pageExcludeRegex feature that was added. You could do something liike:

treeview:
  pageExcludeRegex: "^(?!notes)"

It will still show the "notes" folder itself, though so not sure if this gets you exactly what you want?

joekrill commented 4 months ago

Quick update: I made some modifications to the treeview filtering settings. The exclusion rule to only show the notes folder would now be handled like this:

treeview:
  exclusions:
  - type: "regex"
    rule: "^notes"
    negate: true

Let me know if you think I should still consider creating a root folder setting of some sort. If not feel free to close this issue. But if so, what would be the difference? Would the "notes" folder (in your case) simple not exist and everything inside of it would be flattened and appear as root nodes in the tree?

simone-viozzi commented 4 months ago

thank you!