diff --git a/silverbullet-query/SKILL.md b/silverbullet-query/SKILL.md index b3bb485..4bff2a4 100644 --- a/silverbullet-query/SKILL.md +++ b/silverbullet-query/SKILL.md @@ -45,6 +45,9 @@ where p.name:startsWith("proj/") -- Pages with a specific tag where table.includes(p.tags, "account") +-- Pages WITHOUT a specific tag +where not table.includes(p.tags, "account") + -- Pages matching name where p.name:startsWith("Person") @@ -55,6 +58,8 @@ where t.page == _CTX.currentPage.name where p.name:startsWith("proj/") and table.includes(p.tags, "active") ``` +> **Important:** `p.tags` is always an array (possibly empty) on every page. Do NOT use `p.tags` or `not p.tags` as a boolean check — an empty array is still truthy in Lua, so `not p.tags` is always false. Always use `table.includes()` to check for specific tags. + ### Sorting (`order by`) ```