I made a super basic plugin that syncs the frontmatter of two properties in all notes in a set folder. For my use case, this is the “date” property and the “scheduled” property, but this can easily be changed. Basically, it is set up with the following rules in mind:
- If “scheduled” has a date in it, but “date” is empty or does not exist, the note gets a “date” property filled with whatever “scheduled” had.
- Regardless of whether “scheduled” is changed or “date” is changed, “scheduled” will be automatically changed to match “date”
- If both are empty, nothing happens
Which properties are synced can easily be changed in main.js (it is very few lines so it is easy to spot what to change)
The plugin settings themselves give the user the option to change the folder and sync all notes’ two properties in that folder at once. Note properties should sync automatically on their own, however.
This can be useful for cases where one needs to have two properties in a note always the same value (duplicity of properties similar to how notes have aliases, basically a “property alias” functionality). For my use case, I made it in an attempt to use Full Calendar with notes that did not have the “date” property but instead had the “scheduled” property (though I ended up not being able to use Full Calendar due to its “type” property needing to be “single” while I had that property reserved for something else). However, I can see it being useful to others, so I hope someone out there finds a good use for this!
frontmatter-sync.zip (2.2 KB)