From 4f0650d0b77696bdc8209a98123fb20de9b001c7 Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Fri, 23 Feb 2024 10:21:51 +0100 Subject: [PATCH] added custom data property for template instantiation (#716) --- plugs/template/page.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugs/template/page.ts b/plugs/template/page.ts index 9f863ceba..d90b53cd9 100644 --- a/plugs/template/page.ts +++ b/plugs/template/page.ts @@ -90,6 +90,7 @@ async function instantiatePageTemplate( templateName: string, intoCurrentPage: string | undefined, askName: boolean, + customData: any = undefined, ) { const templateText = await space.readPage(templateName!); @@ -107,6 +108,7 @@ async function instantiatePageTemplate( created: "", lastModified: "", perm: "rw", + data: customData, }; // Just used to extract the frontmatter const { frontmatter } = await renderTemplate(