pashashocky / obsidian-note-gallery

A masonry note gallery for obsidian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Images show up even if a query does not include them

spiritualgeek opened this issue · comments

Within each of my directories containing notes, there exists an assets folder.

I have confirmed the functionality of the query I am employing:

query: '[type:mysetup]'
debugQuery: true

Contrarily, it inadvertently selects images from the assets folder, even though the query isn't designed to include them given they are image files and inherently lack front-matter?

The method to circumvent this issue is to use recursive: false, which unfortunately undermines the purpose in scenarios where multiple folders are present

Thanks

Within each of my directories containing notes, there exists an assets folder.

I have confirmed the functionality of the query I am employing:

query: '[type:mysetup]'
debugQuery: true

Contrarily, it inadvertently selects images from the assets folder, even though the query isn't designed to include them given they are image files and inherently lack front-matter?

The method to circumvent this issue is to use recursive: false, which unfortunately undermines the purpose in scenarios where multiple folders are present

Thanks

try add this:
"minus path"
query: '-path: your-path/assets'

Thanks - I thought I had tried this, but it was a query targeting .md files only which did not work

This does not work either. The query returns fine (debugQuery: true) yet the plugin still includes items that the query does not return

No longer using due to activity on the plugin seeming to have ceased. Closing issue

I got the same problem and utilized regex to only show .md files (so that would be excluding images):
Show all notes except images:
query: '/.*\.md/'

When using a tag:
query: '/.*\.md/tag:#diary'

I didn't try other queries since it currently met my expectations. I also didn't check whether there were any flaws with my queries.