Exclude templates folder from File Explorer/Graph


I started using the templates (template plugin) and placed the template folder within the vault’s folder.

However, the templates are being shown in the files explorer and in the graph.

Is there a way to exclude the templates folder?
Could it be saved outside the vault’s folder?


There is not a way to exclude the template folder right now, but this is a great feature request :grinning:

1 Like

Converted to a feature request! @aalakkad I edited the title, feel free to edit further as desired.


Now you could use -path: foldername to exclude your template folder in graph with graph filter.


I am new here - absoluty stunned by this great tool - but templates in Graph View and Tag-Search are “obscuring” everything for me. I’m a bit weirded out by this, as it somehow doesn’t quite fit with the rest of the polished features.

So is there any progress here?

Have you tried using not searches -(query) to filter out what you don’t want to see?

Yes, it works. But this is a “advanced user” workaround imop. A perma Setting would be way better.


I’m quite happy using -path:templates to exclude my templates from my graph view, however, I haven’t worked out how to exclude them from the tags view/searches. That is to say, I include tags in some of my templates where I want notes that are created using that template to be tagged in a particular way. However, I would prefer not to see the template itself included in either the tag count or the search results for that tag.

1 Like

+1 for fixing this issue. There is a lot of reasons for excluding Template folder, it messes with a lot of stuff. tags and also Obsidian to Anki plugin for example. I think it needs a change to the core or a special plugin not a temporary solution for one or two plugins.

1 Like

+1 from me as well. Not just templates but items I wish to archive, tips and tricks, samples and testing notes I have. Don’t need these polluting search and see this as a basic usability issue that shouldn’t need a -path solution.

1 Like

You can use CSS snippet to exclude from explorer :

div[data-path='path_from_vault'] + div.nav-folder-children 
    display: none;

You can also use it to hide md file (you need to remove the second line.

It’s not hide from graph or tag panel, it just hide in the explorer.


@Mara-Li thank you for sharing, this is quite helpful.

1 Like

@Mara-Li , excuse my ignorance as I don’t know how to define ‘path_from_vault’. I tried everything, even the full path, nothing works.

It’s the relative path. You can see it with the dev console and selection.
For exemple :

├─ folder 1/
│  ├─ folder 3/
│  ├─ folder 4/

The path for folder 3 will be : folder 1/folder3

Thank you!

1 Like