decaf-dev / obsidian-vault-explorer

Explore your Obsidian vault in visual format
https://vaultexplorer.com
MIT License
111 stars 4 forks source link

Logic of exploring #192

Open nyssance opened 4 months ago

nyssance commented 4 months ago

When users are exploring, for example in grid mode, what is actually needed is something like macOS Finder/Windows File Explorer. It doesn't need to list all notes in a flat structure, but rather list notes and folders, and then allow users to click on folders to enter their directories. Maybe add a default filter that allows hierarchical navigation into folders?

Similar to this plugin https://github.com/xpgo/obsidian-folder-note-plugin, but don't need add folder note for every directory manually.

Btw, this plugin can find the first image and show it in gridview without need to set image to property, it's useful for daily note. I write a daily note and with a picture(my pet or some delicious food). I want to see this picture in the not, but I also want to see it in the grid view, without having to set it in the property.

decaf-dev commented 3 months ago

@nyssance Added automatic cover image detection in 1.30.0. Please try it out. Looking for feedback

Moyf commented 3 months ago

@nyssance Added automatic cover image detection in 1.30.0. Please try it out. Looking for feedback

An issue of url image

Hi! I found that if I set the url in frontmatter: image

it will show a broken image: image

I checked the dev tool and the image url itself is correct, I can open it in my browser. I guess it might be due to some access restriction of this website.

If you want to test, here is the url: https://www.bilibili.com/video/BV1MU411S7qZ/

And then I turn of the Load social media image in setting: image

Then it just show nothing - even I got images in my note and hope to show the first image in body.

If there is some fallback mechanism it would be better.

my plugin version: 1.32.2


Might be another new FR

BTW, could you consider adding more options for cover image detection ? image

For example, maybe an array of "cover soure" like..

Cover Source:

  1. ✅ Url
  2. ✅ First Image in Page
  3. ❌ Property
  4. ✅ Preview Text (Like the Feed View - showing some text rather than empty background )

Query from top to bottom, displaying the first valid image. If users doesn't want to show any image they can just un-check all of the options. ( but why? 🤔)

And if it can be re-ordered, that would be even better! image

nyssance commented 3 months ago

@decaf-dev I don't know how to make it work. How to config the setting?

This is one of my daily note

---
cssclasses:
  - cover
prefer-view: read
created: 2024-05-06
author: NY
---
![cover](https://images.unsplash.com/photo-1708980046899-3e2b09bb7b6b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTcxNDk4Mzk0Mw&ixlib=rb-4.0.3&q=80&w=1080)

# 2024-05-06
...

This is another with inner image

---
cssclasses:
  - cover
created: 2024-05-02
author: NY
---
![[IMG_2929.jpeg|cover]]

# 2024-05-02
...
decaf-dev commented 3 months ago

@nyssance Ah, yes. There were some edge cases that I missed. I had only tested embedded links like ![[my image]]

decaf-dev commented 3 months ago

@nyssance Sorry for the delay. I just pushed out 1.37.0. This adds support for the image links that you posted above. Please try it out!

nyssance commented 3 months ago

@decaf-dev Perfectly displayed all my images, I think notes without image may be use a default image or a random color to look more aesthetically.