aguilaaa46 downloadsTyped schemas for note kinds: frontmatter validation, autocomplete, and autofix.
Give your note kinds a type. Note Schemas lets you declare, in one file, what frontmatter each kind of note should carry — required fields, their types, allowed enum values — and then validates your vault against those rules, autocompletes frontmatter while you type, and safely autofixes the easy mistakes.
✓ valid / ✗ invalid),
refreshed on save.--- block.default, and
coerce obvious type mistakes (numeric strings → numbers, "true"/"false" →
booleans, a lone scalar → a one-item list).By default the plugin reads note-schemas.json from your vault's config directory
(usually .obsidian/note-schemas.json); the path is configurable in settings.
It is a map of type name → definition:
{
"book": {
"match": { "folder": "Books", "tagged": "book", "frontmatterType": "book" },
"fields": {
"title": { "type": "string", "required": true },
"author": { "type": "string" },
"status": { "type": "enum", "values": ["to-read", "reading", "done"], "default": "to-read", "required": true },
"rating": { "type": "number" },
"tags": { "type": "list" },
"finished": { "type": "date" }
}
},
"meeting": {
"match": { "folder": "Meetings" },
"fields": {
"date": { "type": "date", "required": true },
"attendees": { "type": "list", "required": true },
"type": { "type": "string" }
}
}
}
YAML is also supported — point the setting at a .yaml/.yml file instead.
For each note the plugin picks the first matching type:
type equals a declared type name, that type is used.match rule is tried in declaration order:frontmatterType — frontmatter type equals this value,folder — the note lives in (or under) this folder,tagged — the note carries this tag (frontmatter or inline, # optional).Notes that match no type are simply ignored ("untyped").
string, number, boolean, date (YYYY-MM-DD), enum (requires values),
list. Each field may set required: true, and any field may declare a default
used by autofix. A list field may also declare values; its members are then
validated against that allow-list.
date accepts YYYY-MM-DD-style strings (and real dates) but does not check
calendar validity (e.g. 2026-02-31 passes).default, and only performs
loss-free coercions.This plugin is not yet in the community store. To install it manually:
main.js is produced next
to manifest.json.manifest.json, main.js, and styles.css into
<your-vault>/.obsidian/plugins/note-schemas/.note-schemas.json in your vault's config directory with a schema like
the example above.If this plugin is useful to you, you can support its development at Buy Me a Coffee.