From d834646686296a096fd5dd6c654894b7ed4f26be Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 27 Nov 2023 10:03:23 +0100 Subject: [PATCH] Don't index templates as pages --- plugs/index/page.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugs/index/page.ts b/plugs/index/page.ts index c14583ee..de2d462b 100644 --- a/plugs/index/page.ts +++ b/plugs/index/page.ts @@ -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(name, [pageMeta]); }