docs: Add documentation for Dataview support, including examples and usage notes.
This commit is contained in:
25
README.md
25
README.md
@@ -179,6 +179,31 @@ Behavior:
|
|||||||
- External links open in your browser.
|
- External links open in your browser.
|
||||||
- File links open via the OS.
|
- File links open via the OS.
|
||||||
|
|
||||||
|
## Dataview Support
|
||||||
|
|
||||||
|
You can render Dataview queries inside the menu block. The links generated by the query will be styled just like other menu items.
|
||||||
|
|
||||||
|
Prefix your query with `dataview:` or `dv:`.
|
||||||
|
|
||||||
|
````markdown
|
||||||
|
```menu
|
||||||
|
layout: default
|
||||||
|
[[Home]]
|
||||||
|
dataview: LIST FROM "Projects"
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
Or a more complex query:
|
||||||
|
|
||||||
|
````markdown
|
||||||
|
```menu
|
||||||
|
layout: horizon
|
||||||
|
dv: LIST WITHOUT ID link(file.link, file.name) FROM #tag
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
|
**Note:** The plugin automatically unwraps the Dataview list structure so the links participate directly in the menu's flex/grid layout.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Use either `layout:` or `class:`. If the value contains a built-in template, the template is applied. Otherwise, it’s treated as a pure CSS class (no plugin CSS).
|
- Use either `layout:` or `class:`. If the value contains a built-in template, the template is applied. Otherwise, it’s treated as a pure CSS class (no plugin CSS).
|
||||||
|
|||||||
Reference in New Issue
Block a user