Fix not passing in global vars into renderTemplate

pull/679/head
Zef Hemel 2024-02-03 15:37:22 +01:00
parent d0ebda0d7a
commit 82cb0ed267
2 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,7 @@ async function instantiatePageTemplate(
const { frontmatter } = await renderTemplate(
templateText,
tempPageMeta,
{ page: tempPageMeta },
);
let frontmatterConfig: FrontmatterConfig;
@ -175,6 +176,7 @@ async function instantiatePageTemplate(
const { text: pageText, renderedFrontmatter } = await renderTemplate(
templateText,
tempPageMeta,
{ page: tempPageMeta },
);
let fullPageText = renderedFrontmatter
? "---\n" + renderedFrontmatter + "---\n" + pageText

View File

@ -39,6 +39,7 @@ export async function insertSnippetTemplate(slashCompletion: SlashCompletion) {
await renderTemplate(
templateText,
pageObject,
{ page: pageObject },
);
let snippetTemplate: SnippetConfig;
try {