From d4033763f72cb75d19bd0cc4ee922446865de849 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Thu, 17 Apr 2025 12:59:53 +0200 Subject: [PATCH] Enhance link indexing logic for meta template pages - Added a check to skip indexing links for pages tagged as "meta/template" to prevent indexing links there. - Updated the documentation in `Spaces.md` to remove redundant information regarding git repository usage for space folders. --- plugs/index/page_links.ts | 6 ++++++ website/Spaces.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugs/index/page_links.ts b/plugs/index/page_links.ts index ab26720d..7234052d 100644 --- a/plugs/index/page_links.ts +++ b/plugs/index/page_links.ts @@ -70,6 +70,12 @@ export async function indexLinks({ name, tree }: IndexTreeEvent) { const frontmatter = await extractFrontmatter(tree); const pageText = renderToText(tree); + // If this is a meta template page, we don't want to index links + if (frontmatter.tags?.find((t) => t.startsWith("meta/template"))) { + console.log("Skipping meta template page", name); + return; + } + traverseTree(tree, (n): boolean => { // Index [[WikiLinks]] if (n.type === "WikiLink") { diff --git a/website/Spaces.md b/website/Spaces.md index 8be491a5..a244f10d 100644 --- a/website/Spaces.md +++ b/website/Spaces.md @@ -1,6 +1,6 @@ A _space_ is SilverBullet terminology for a workspace, or project, or instance. [Obsidian](https://obsidian.md/) calls this a vault, [LogSeq](https://logseq.com/) calls it a graph. You may think of it as a [[Folders|folder]] or a directory — because in practical terms, that’s all it is. -Feel free to back up or manipulate your space’s folder and its files with whatever tool you like — you don’t have to use SilverBullet exclusively. You may want to turn your space’s folder into a git repository, for instance, and do version control and back-ups that way — in which case you may appreciate the [[Plugs/Git]] plug. +Feel free to back up or manipulate your space’s folder and its files with whatever tool you like — you don’t have to use SilverBullet exclusively. You may want to turn your space’s folder into a git repository, for instance, and do version control and back-ups that way. A space consists of * [[Folders]]