Don't index templates as pages
parent
ec10cc1e79
commit
d834646686
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue