Allow page templates to apply to any new page #671

This commit is contained in:
Zef Hemel
2024-01-31 13:00:42 +01:00
parent b16d884701
commit da9ca842bf
+1 -1
View File
@@ -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);