From 51bfc8f9e34406a196472d809ba3c9f5ac291eb1 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Thu, 6 Nov 2025 21:40:15 +0100 Subject: [PATCH] feat(explorer): Add active class to current folder in explorer --- 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 9c8341169..3c6851c7b 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