jplattel / obsidian-query-language

An Obsidian plugin allowing you to query your notes
176 stars 6 forks source link

[Feature Request] support multiple rendering block with custom label #27

Open TenviLi opened 3 years ago

TenviLi commented 3 years ago

I hope OQL can support rendering the note list of the directory structure into the following markdown.

And you can customize the block label's format just like the format: field.

In other words, you can go deep through the directory structure(or in other ways such as tags?) and render multiple times.

Let's see an example ⬇️:

# your oql options
name: Daily notes
query:
  path: "'docs"
template: "list"
badge: true
sort: "title"
format: "{title}"
# new option
multiple:
  labelFormat: '### {index} {relative_path}' # new field {relative_path}
  field: 'relative_path'

when your directory structure like this

- docs
    - oh
        - a.md
    - thats
        - b.md
    - good
        - c.md

it will be rendered into

### 1 oh

- [[a]]

### 2 thats

- [[b]]

### 3 good

- [[c]]

26