import vault
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<%*
|
||||
// iterbind: binds this note to an iteration note that carries the iterdef component.
|
||||
const componentName = "iterbind";
|
||||
const file = tp.file.find_tfile(tp.file.path(true));
|
||||
|
||||
setTimeout(async () => {
|
||||
await tp.app.fileManager.processFrontMatter(file, (frontmatter) => {
|
||||
const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : [];
|
||||
if (!components.includes(componentName)) components.push(componentName);
|
||||
|
||||
frontmatter["components"] = components;
|
||||
frontmatter["iterbind_target"] = frontmatter["iterbind_target"] ?? "[[]]";
|
||||
frontmatter["iterbind_status"] = frontmatter["iterbind_status"] ?? "planned";
|
||||
frontmatter["iterbind_role"] = frontmatter["iterbind_role"] ?? "primary";
|
||||
frontmatter["iterbind_order"] = frontmatter["iterbind_order"] ?? 0;
|
||||
});
|
||||
}, 300)
|
||||
-%>
|
||||
Reference in New Issue
Block a user