From a622f3090b354625e9cc5a116df89a8ddf998ede Mon Sep 17 00:00:00 2001 From: Signynt Date: Mon, 4 Aug 2025 17:12:42 +0200 Subject: [PATCH] Updated readme to include info on dataview rules --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index c7632a2..49f79c9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ This is especially useful if you have many files with the same dataview block. I - Lets you define rules using folderes, tags and properties - Rules can be set to include or exclude subfolders and subtags (recursive matching) - Multi-condition rules are possible, allowing you to define multiple conditions for one rule (using AND/OR) + - Dataview filters can be used to create complex rules - Lets you select wether the "virtual content" gets added as a footer (end of file), a header (below properties) or in the sidebar - Lets you choose if all sidebar "virtual content" gets added to the same sidebar tab, or if it should be shown in it's own tab - Allows for "virtual content" to be defined in the plugin settings, or in a markdown file @@ -116,6 +117,14 @@ Just select the "Sidebar" option in the settings, and use the "Open virtual cont ![Untitled](https://github.com/user-attachments/assets/0fa7067a-596e-422b-b676-3f435fa1d49b) +### Applying complex rules using Dataview +You can use Dataview queries to create complex rules. For example, you can create a rule that applies to all notes in a specific folder, but only if they begin with a certain prefix. + +Example dataview rule: +``` +LIST FROM "References/Authors" WHERE startswith(file.name, "Test") OR startswith(file.name, "Example") +``` + ## Limitations Links in the markdown text work natively when in Reading mode, however they don't in Live Preview, so I've added a workaround that gets most functionality back. This means that `left click` works to open the link in the current tab, and `middle mouse` and `ctrl/cmd + left click` works to open the link in a new tab. Right click currently doesn't work.