Define note classes as templates and automatically keep instance note properties in sync.
- Lets you create property templates as classes and automatically sync them to all instances.
- Saves manual work when adding a new property to many files.
- Supports recursive inheritance through class hierarchies.
- Supports property rename propagation to instances.
- Create class template notes in your configured class folder.
- Add frontmatter properties to those class notes.
- In any instance note, add a class tag in
tags, for example:
---
tags:
- class/rectangle
---- The instance note inherits class properties.
- Recursive inheritance is supported.
- If
CimplementsBandBimplementsA, then instances ofCget properties in order:A,B,C. - Duplicate property names are deduplicated by normalized name.
Folder containing class template notes.
When enabled, instance files keep properties that are not defined by their classes.
When disabled, those extra properties are removed during refresh.
Per-instance override:
- Add this tag to an instance note to always keep additional properties:
allow-additional-properties-outside-classes
- The plugin warns about class loops and removes loop-causing class tags.
- If you turn off additional instance properties, refreshing can remove non-class properties from instances.
- A warning box is shown in settings when this change may affect existing data.
- If you rename a class file after it is already used, class links can break.
- For now, avoid renaming class files once they are in use.
- Renaming properties inside a class works as expected.
- Manual refresh: refreshes class relationships and instance synchronization.
- Insert example: creates a sample class hierarchy and usage note.
Requirements:
- Node.js 18+ recommended
- npm
Install:
npm installBuild:
npm run buildWatch mode:
npm run devLint:
npm run lintCopy these files to:
<Vault>/.obsidian/plugins/property-template-classes/
main.jsmanifest.jsonstyles.css
Then reload Obsidian and enable the plugin in:
Settings -> Community plugins