Don't index templates as pages

docker-uid
Zef Hemel 2023-11-27 10:03:23 +01:00
parent ec10cc1e79
commit d834646686
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,11 @@ export async function indexPage({ name, tree }: IndexTreeEvent) {
pageMeta.tags = [...new Set(["page", ...pageMeta.tags || []])];
if (pageMeta.tags.includes("template")) {
// If this is a template, we don't want to index it as a page or anything else, just a template
pageMeta.tags = ["template"];
}
// console.log("Page object", pageObj);
await indexObjects<PageMeta>(name, [pageMeta]);
}