mirror of
https://github.com/kepano/obsidian-skills.git
synced 2026-12-05 10:05:18 -08:00
docs: clarify properties prefix rule and add CLI/Bases prerequisites
obsidian-bases: - Document the asymmetric prefix rule: in `properties:` config block, frontmatter keys must use `note.` prefix or `displayName` is silently ignored (column header shows raw field name). In `order`, `filters`, `groupBy`, `sort`, the bare form still works. - Update Schema and Task Tracker / Reading List examples to show the `note.` prefix in `properties:` blocks. - Add a Prerequisite note: Bases is a core plugin and may need to be enabled in `core-plugins.json` for vaults that predate v1.9. - Add a Troubleshooting entry for the displayName-ignored symptom. obsidian-cli: - Add Prerequisites section: Obsidian on macOS has two version numbers (asar bundle auto-updates, installer does not). The in-app updater can report "latest" while installer is too old to ship the CLI binary. Document how to check the installer version and reinstall. - Add health check command and a fallback path for environments where the CLI isn't available. These are documentation-only changes informed by hands-on use that hit both gotchas (displayName silently ignored, CLI missing despite "latest version" prompt).
This commit is contained in:
@@ -5,6 +5,10 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f
|
||||
|
||||
# Obsidian Bases Skill
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always enabled by default** — particularly in vaults that predate v1.9. If `.base` files don't appear in the file tree or won't render, check that `.obsidian/core-plugins.json` contains `"bases": true`. Enable via Settings → Core plugins → Bases, or edit the JSON and reload the vault.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Create the file**: Create a `.base` file in the vault with valid YAML content
|
||||
@@ -31,13 +35,15 @@ filters:
|
||||
formulas:
|
||||
formula_name: 'expression'
|
||||
|
||||
# Configure display names and settings for properties
|
||||
# Configure display names and settings for properties.
|
||||
# IMPORTANT: keys in this section must use their fully-qualified form.
|
||||
# Frontmatter properties need the `note.` prefix or the displayName is silently ignored.
|
||||
properties:
|
||||
property_name:
|
||||
note.property_name: # frontmatter property — MUST prefix with `note.`
|
||||
displayName: "Display Name"
|
||||
formula.formula_name:
|
||||
formula.formula_name: # formula reference — already prefixed
|
||||
displayName: "Formula Display Name"
|
||||
file.ext:
|
||||
file.ext: # file property — already prefixed
|
||||
displayName: "Extension"
|
||||
|
||||
# Define custom summary formulas
|
||||
@@ -123,6 +129,8 @@ filters:
|
||||
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
|
||||
3. **Formula properties** - Computed values: `formula.my_formula`
|
||||
|
||||
**Asymmetric prefix rule**: in `order`, `filters`, `groupBy`, and `sort`, a frontmatter property can be referenced bare (`author`) or prefixed (`note.author`). But in the top-level `properties:` configuration block (where `displayName` is set), frontmatter keys **must** use the `note.` prefix — bare keys are silently ignored and the raw field name will appear as the column header. See Troubleshooting for the symptom.
|
||||
|
||||
### File Properties Reference
|
||||
|
||||
| Property | Type | Description |
|
||||
@@ -302,7 +310,7 @@ formulas:
|
||||
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
|
||||
|
||||
properties:
|
||||
status:
|
||||
note.status:
|
||||
displayName: Status
|
||||
formula.days_until_due:
|
||||
displayName: "Days Until Due"
|
||||
@@ -351,7 +359,7 @@ formulas:
|
||||
year_read: 'if(finished_date, date(finished_date).year, "")'
|
||||
|
||||
properties:
|
||||
author:
|
||||
note.author:
|
||||
displayName: Author
|
||||
formula.status_icon:
|
||||
displayName: ""
|
||||
@@ -476,6 +484,22 @@ formulas:
|
||||
'if(due_date, (date(due_date) - today()).days, "")'
|
||||
```
|
||||
|
||||
**`displayName` ignored / column shows raw field name**: in the `properties:` configuration block, frontmatter keys must be prefixed with `note.`. Bare keys are silently ignored.
|
||||
|
||||
```yaml
|
||||
# WRONG - displayName ignored, column header shows "status"
|
||||
properties:
|
||||
status:
|
||||
displayName: Status
|
||||
|
||||
# CORRECT - column header shows "Status"
|
||||
properties:
|
||||
note.status:
|
||||
displayName: Status
|
||||
```
|
||||
|
||||
This asymmetry trips users up because `order`, `filters`, and `groupBy` all accept the bare form. The `properties:` block is the exception.
|
||||
|
||||
**Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user