From da9ca842bf07bf79a1bc275e98550edb65cdab65 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Wed, 31 Jan 2024 13:00:14 +0100 Subject: [PATCH] Allow page templates to apply to any new page #671 --- plugs/template/page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugs/template/page.ts b/plugs/template/page.ts index 291fe616..d1da159c 100644 --- a/plugs/template/page.ts +++ b/plugs/template/page.ts @@ -37,7 +37,7 @@ export async function newPage(pageName: string) { const allPageTemplatesMatchingPrefix = (await listPageTemplates()).filter( (templateObject) => { const forPrefix = templateObject.hooks?.newPage?.forPrefix; - return forPrefix && pageName.startsWith(forPrefix); + return forPrefix !== undefined && pageName.startsWith(forPrefix); }, ); // console.log("Matching templates", allPageTemplatesMatchingPrefix);