4 Commits

Author SHA1 Message Date
Steph Ango 192500ad0d Bases: Add kanban and groupOrder to the schema
Note that a kanban view needs groupBy and shows every value without groupOrder. Keep main's PROPERTIES.md, which already lists Tags and how to store links.
2026-11-11 07:50:40 -08:00
Steph Ango 5153119854 Merge pull request #153 from bencharoenwong/docs/property-types-and-kanban
# Conflicts:
#	plugins/obsidian/skills/obsidian-markdown/references/PROPERTIES.md
2026-11-11 07:50:16 -08:00
Ben Charoenwong b178fdfbb7 docs(obsidian-bases): match kanban move rules to the help docs 2026-11-10 19:53:54 +01:00
Ben Charoenwong 3436b16881 docs: fix property types (closes #139), add Bases kanban view 2026-11-10 11:38:17 +01:00
2 changed files with 35 additions and 32 deletions
+35 -30
View File
@@ -1,6 +1,6 @@
--- ---
name: obsidian-bases name: obsidian-bases
description: Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian. description: Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, kanban boards, filters, or formulas in Obsidian.
--- ---
# Obsidian Bases Skill # Obsidian Bases Skill
@@ -10,9 +10,9 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f
1. **Create the file**: Create a `.base` file in the vault with valid YAML content 1. **Create the file**: Create a `.base` file in the vault with valid YAML content
2. **Define scope**: Add `filters` to select which notes appear (by tag, folder, property, or date) 2. **Define scope**: Add `filters` to select which notes appear (by tag, folder, property, or date)
3. **Add formulas** (optional): Define computed properties in the `formulas` section 3. **Add formulas** (optional): Define computed properties in the `formulas` section
4. **Configure views**: Add one or more views (`table`, `cards`, `list`, or `map`) with `order` specifying which properties to display 4. **Configure views**: Add one or more views (`table`, `cards`, `list`, `map`, or `kanban`) with `order` specifying which properties to display
5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas` 5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas`
6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below. If it doesn't open as a base at all, check that Bases is turned on in Settings → Core plugins 6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below
## Schema ## Schema
@@ -32,10 +32,9 @@ filters:
formulas: formulas:
formula_name: 'expression' formula_name: 'expression'
# Configure display names and settings for properties. # Configure display names and settings for properties
# Note properties need the `note.` prefix here, or the setting is ignored.
properties: properties:
note.property_name: property_name:
displayName: "Display Name" displayName: "Display Name"
formula.formula_name: formula.formula_name:
displayName: "Formula Display Name" displayName: "Formula Display Name"
@@ -48,12 +47,15 @@ summaries:
# Define one or more views # Define one or more views
views: views:
- type: table | cards | list | map - type: table | cards | list | map | kanban
name: "View Name" name: "View Name"
limit: 10 # Optional: limit results limit: 10 # Optional: limit results
groupBy: # Optional: group results groupBy: # Optional: group results
property: property_name property: property_name
direction: ASC | DESC direction: ASC | DESC
groupOrder: # Optional: only these groups, in this order
- value_one
- null # Files with no value for the groupBy property
sort: # Optional: sort results (supports multiple properties) sort: # Optional: sort results (supports multiple properties)
- property: property_name - property: property_name
direction: ASC | DESC direction: ASC | DESC
@@ -129,8 +131,6 @@ filters:
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc. 2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
3. **Formula properties** - Computed values: `formula.my_formula` 3. **Formula properties** - Computed values: `formula.my_formula`
In `order`, `filters`, `groupBy`, and `sort`, a note property can be written bare (`author`) or prefixed (`note.author`). In the top-level `properties:` section, always write `note.author`, because Obsidian ignores a bare key there and shows the raw name as the column header.
### File Properties Reference ### File Properties Reference
| Property | Type | Description | | Property | Type | Description |
@@ -145,9 +145,10 @@ In `order`, `filters`, `groupBy`, and `sort`, a note property can be written bar
| `file.mtime` | Date | Modified time | | `file.mtime` | Date | Modified time |
| `file.tags` | List | All tags in file | | `file.tags` | List | All tags in file |
| `file.links` | List | Internal links in file | | `file.links` | List | Internal links in file |
| `file.backlinks` | List | Files linking to this file | | `file.backlinks` | List | Files linking to this file. Slow in large vaults and doesn't refresh when the vault changes; prefer reversing the lookup with `file.links` |
| `file.embeds` | List | Embeds in the note | | `file.embeds` | List | Embeds in the note |
| `file.properties` | Object | All frontmatter properties | | `file.properties` | Object | All frontmatter properties. Doesn't refresh when the vault changes |
| `file.file` | File | File object, only usable in specific functions |
### The `this` Keyword ### The `this` Keyword
@@ -263,6 +264,26 @@ views:
- status - status
``` ```
### Kanban View
Requires Obsidian 1.14+. Cards are grouped into columns by the `groupBy` property, which a kanban view needs. `groupOrder` sets which columns show and in what order; use `null` to include files with no value. Without `groupOrder`, every value gets a column. Dragging a card to another column updates that property in the note. Only Markdown notes can be moved, except when grouping by `file.folder`, where moving a card moves the file to that folder. When grouping by a formula or by a file property other than `file.folder`, cards and columns can't be moved and notes can't be created from a column.
```yaml
views:
- type: kanban
name: "Projects"
groupBy:
property: note.status
direction: ASC
groupOrder:
- Planned
- In progress
- Done
order:
- file.name
- due_date
```
### Map View ### Map View
Requires latitude/longitude properties and the Maps community plugin. Requires latitude/longitude properties and the Maps community plugin.
@@ -339,7 +360,7 @@ formulas:
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))' priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
properties: properties:
note.status: status:
displayName: Status displayName: Status
formula.days_until_due: formula.days_until_due:
displayName: "Days Until Due" displayName: "Days Until Due"
@@ -393,10 +414,10 @@ formulas:
year_read: 'if(finished_date, date(finished_date).year, "")' year_read: 'if(finished_date, date(finished_date).year, "")'
properties: properties:
note.author: author:
displayName: Author displayName: Author
formula.status_icon: formula.status_icon:
displayName: "Status" displayName: ""
formula.reading_time: formula.reading_time:
displayName: "Est. Time" displayName: "Est. Time"
@@ -540,22 +561,6 @@ formulas:
'if(due_date, (date(due_date) - today()).days, "")' 'if(due_date, (date(due_date) - today()).days, "")'
``` ```
**`displayName` ignored, column shows the raw name**: prefix note properties with `note.` in the `properties:` section.
```yaml
# WRONG - displayName ignored, column header shows "status"
properties:
status:
displayName: Status
# CORRECT - column header shows "Status"
properties:
note.status:
displayName: Status
```
**Empty `displayName` doesn't hide a header**: `displayName: ""` falls back to the property name, the same as leaving it out, so `formula.status_icon` shows `status_icon`. Use a non-empty name such as `displayName: "Status"`.
**Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`. **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
```yaml ```yaml
@@ -11,8 +11,6 @@ Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Ob
Run `obsidian help` to check availability. If the command is missing, explain how to turn on the CLI using https://help.obsidian.md/cli. The `obsidian` command ships with the Obsidian installer; don't install the unrelated npm package `obsidian-cli`. If it can't find Obsidian, ask the user to open the desktop app, then retry. In a sandboxed shell the same message can mean the sandbox blocked the CLI's local socket. Run `obsidian help` to check availability. If the command is missing, explain how to turn on the CLI using https://help.obsidian.md/cli. The `obsidian` command ships with the Obsidian installer; don't install the unrelated npm package `obsidian-cli`. If it can't find Obsidian, ask the user to open the desktop app, then retry. In a sandboxed shell the same message can mean the sandbox blocked the CLI's local socket.
On WSL, run `Obsidian.com` from the Windows install folder, not `Obsidian.exe`. `Obsidian.com` is the console wrapper that prints the output; `Obsidian.exe` exits without printing anything.
The CLI exits with status 0 even when a command fails, so read its output before reporting that a command succeeded. The CLI exits with status 0 even when a command fails, so read its output before reporting that a command succeeded.
Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax. Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax.