No longer index templates tagged as #template

This commit is contained in:
Zef Hemel
2023-11-09 09:26:44 +01:00
parent 366b2ed395
commit d58db6aa1a
19 changed files with 307 additions and 64 deletions
+6 -2
View File
@@ -28,7 +28,9 @@ export async function updateDirectivesOnPageCommand() {
}
const text = await editor.getText();
const tree = await markdown.parseMarkdown(text);
const metaData = await extractFrontmatter(tree, ["$disableDirectives"]);
const metaData = await extractFrontmatter(tree, {
removeKeys: ["$disableDirectives"],
});
if (isFederationPath(currentPage)) {
console.info("Current page is a federation page, not updating directives.");
@@ -173,7 +175,9 @@ async function updateDirectivesForPage(
const pageMeta = await space.getPageMeta(pageName);
const currentText = await space.readPage(pageName);
const tree = await markdown.parseMarkdown(currentText);
const metaData = await extractFrontmatter(tree, ["$disableDirectives"]);
const metaData = await extractFrontmatter(tree, {
removeKeys: ["$disableDirectives"],
});
if (isFederationPath(pageName)) {
console.info("Current page is a federation page, not updating directives.");