From f346a01296e5bdbd19de38fa69968b42629b883d Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Thu, 8 Jan 2026 02:54:41 +0100 Subject: [PATCH] feat(explorer): Add active class to current folder in explorer (#2196) --- quartz/components/scripts/explorer.inline.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quartz/components/scripts/explorer.inline.ts b/quartz/components/scripts/explorer.inline.ts index 9c83411..3c6851c 100644 --- a/quartz/components/scripts/explorer.inline.ts +++ b/quartz/components/scripts/explorer.inline.ts @@ -111,6 +111,10 @@ function createFolderNode( const folderPath = node.slug folderContainer.dataset.folderpath = folderPath + if (currentSlug === folderPath) { + folderContainer.classList.add("active") + } + if (opts.folderClickBehavior === "link") { // Replace button with link for link behavior const button = titleContainer.querySelector(".folder-button") as HTMLElement