Repository navigation
feat: dg-hide hides everywhere (search, graph, backlinks, feed, sitemap) - #381
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…links Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Template half of the
dg-hiderework. Makes published notes honor three independent hide flags written by the Obsidian plugin (companion PR: oleeskild/obsidian-digital-garden#796):hide(dg-hide) — hide everywhere: filetree, search, graph, backlinks, RSS feed, sitemap. Page still reachable by URL.hideInFiletree(dg-hide-in-filetree) — filetree only.hideInGraph(dg-hide-in-graph) — graph only (unchanged).Implements #708 and #295; resolves #240 / #726.
Changes
src/helpers/filetreeUtils.js— filetree hides onhide || hideInFiletree.src/helpers/linkUtils.js— graph nodehide = hide || hideInGraph; newprivate = hideflag.src/site/_includes/components/sidebar.njk— backlinks skipprivatenotes..eleventy.js— newnotHiddenfilter.src/site/search-index.njk,feed.njk— filter throughnotHidden.src/site/sitemap.njk— skippage.data.hide.Notes previously using
dg-hidefor filetree-only decluttering will now also leave search/graph/feed/sitemap. Migrate those todg-hide-in-filetree.Known / intentional (not addressed here)
dg-hidenotes stay reachable by direct URL by design.graph.jsonstill physically ships hidden nodes; the client renderer filters them (pre-existing behavior, same ashideInGraph).random.njkcould still land on a hidden note — possible follow-up.Test Plan
npx vitest run src/helpers/filetreeUtils.test.js src/helpers/linkUtils.test.js— 17/17 passdg-hidenote absent fromsearchIndex.json,sitemap.xml, andfeed.xmlentries; valid search JSON;dg-hide-in-filetreenote still present in search/sitemap🤖 Generated with Claude Code