Skip to content

feat: dg-hide hides everywhere (search, graph, backlinks, feed, sitemap) - #381

Merged
oleeskild merged 4 commits into
mainfrom
task/dg-hide-everywhere
Jun 24, 2026
Merged

oleeskild merged 4 commits into
mainfrom
task/dg-hide-everywhere

Conversation

@oleeskild

Copy link
Copy Markdown
Owner

Summary

Template half of the dg-hide rework. 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 on hide || hideInFiletree.
  • src/helpers/linkUtils.js — graph node hide = hide || hideInGraph; new private = hide flag.
  • src/site/_includes/components/sidebar.njk — backlinks skip private notes.
  • .eleventy.js — new notHidden filter.
  • src/site/search-index.njk, feed.njk — filter through notHidden.
  • src/site/sitemap.njk — skip page.data.hide.
  • Vitest coverage for filetree + graph hide logic.

⚠️ Breaking change

Notes previously using dg-hide for filetree-only decluttering will now also leave search/graph/feed/sitemap. Migrate those to dg-hide-in-filetree.

Known / intentional (not addressed here)

  • dg-hide notes stay reachable by direct URL by design.
  • graph.json still physically ships hidden nodes; the client renderer filters them (pre-existing behavior, same as hideInGraph).
  • random.njk could 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 pass
  • Build smoke test with fixture notes: dg-hide note absent from searchIndex.json, sitemap.xml, and feed.xml entries; valid search JSON; dg-hide-in-filetree note still present in search/sitemap

🤖 Generated with Claude Code

oleeskild and others added 4 commits June 5, 2026 11:10
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>
@oleeskild
oleeskild merged commit 3733ae5 into main Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A render bug caused by "[["

1 participant