added custom data property for template instantiation (#716)

pull/744/head
Michael Kolb 2024-02-23 10:21:51 +01:00 committed by GitHub
parent 702474dca1
commit 4f0650d0b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -90,6 +90,7 @@ async function instantiatePageTemplate(
templateName: string, templateName: string,
intoCurrentPage: string | undefined, intoCurrentPage: string | undefined,
askName: boolean, askName: boolean,
customData: any = undefined,
) { ) {
const templateText = await space.readPage(templateName!); const templateText = await space.readPage(templateName!);
@ -107,6 +108,7 @@ async function instantiatePageTemplate(
created: "", created: "",
lastModified: "", lastModified: "",
perm: "rw", perm: "rw",
data: customData,
}; };
// Just used to extract the frontmatter // Just used to extract the frontmatter
const { frontmatter } = await renderTemplate( const { frontmatter } = await renderTemplate(