import vault
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<%*
|
||||
// reviewable: marks this note for review, follow-up or data hygiene.
|
||||
const componentName = "reviewable";
|
||||
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["review_status"] = frontmatter["review_status"] ?? "needs_review";
|
||||
frontmatter["review_reason"] = frontmatter["review_reason"] ?? "initial review required";
|
||||
frontmatter["review_next"] = frontmatter["review_next"] ?? "";
|
||||
frontmatter["review_by"] = frontmatter["review_by"] ?? "";
|
||||
});
|
||||
}, 300)
|
||||
-%>
|
||||
Reference in New Issue
Block a user