ras0q / obsidian-graph-banner

An Obsidian plugin to display a relation graph view on the note header.
MIT License
49 stars 0 forks source link

[Feature Request] Blacklist notes from showing the banner #22

Closed Ekb18 closed 2 months ago

Ekb18 commented 5 months ago

I really like the plug-in, however, it would be wonderful if we could blacklist certain notes from showing the local graph, such as notes pinned in the sidebars.

ras0q commented 5 months ago

Thank you for the feedback! Unfortunately, this plugin cannot control the content of the local graph, so please try to use the "Filters". image

Ekb18 commented 5 months ago

I actually meant that some notes will not show the banner when active, not whether or not they show up in the local graph.

ras0q commented 5 months ago

I'm sorry I misread it. I've reopened the issue.

madigan commented 5 months ago

@ras0q What about a blacklist feature in settings that allows users to suppress the graph banner based on file name or a file property? If you'd be open to it I could put a PR together.

ras0q commented 5 months ago

@madigan very good! Actually, I was thinking of adopting .gitignore syntax for blacklist implementation, using https://github.com/kaelzhang/node-ignore, etc. if you don't have a strong preference. If you could put a PR, I would very much appreciate it!

madigan commented 5 months ago

@ras0q I can totally do that. I like using the .gitignore syntax.

The only other thought that I had was that it might be helpful to be able to do ignores based off of markdown properties. The use case I'm thinking of is that all my notes have a type property, and it would be helpful to disable the graph for a given "type" of note (such as my "meta" notes which have an absurd number of links). The benefit would be that the .gitignore approach will require a consistent naming schema (or blacklisting each individual file).

That being said, these two things are not mutually exclusive. I could add support for .gitignore now, and then we could look at adding other means of blacklisting after further discussion?

ras0q commented 5 months ago

@madigan I couldn't quite imagine how to use properties to ignore files, but indeed, ignoring the meta notes seems like a good strategy. I really appreciate it if those who are motivated can work on it.

Moyf commented 4 months ago

With this new feature, is it possible to blacklist whole folder (/DontShow/ThisFolder/ ), just like the gitignore syntax?