From fbca56f2783b9e5bfaeffec990990d4330c31b9d Mon Sep 17 00:00:00 2001
From: Shane McDonald <me@shanemcd.com>
Date: Wed, 19 Mar 2025 19:47:16 +0000
Subject: [PATCH] fix(lastmod) Change defaultDateType to "modified" (#1862)

---
 quartz/util/fileTrie.ts |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/quartz/util/fileTrie.ts b/quartz/util/fileTrie.ts
index b39833c..e3dc2e7 100644
--- a/quartz/util/fileTrie.ts
+++ b/quartz/util/fileTrie.ts
@@ -89,6 +89,14 @@
     this.insert(file.slug.split("/"), file)
   }
 
+  findNode(path: string[]): FileTrieNode<T> | undefined {
+    if (path.length === 0 || (path.length === 1 && path[0] === "index")) {
+      return this
+    }
+
+    return this.children.find((c) => c.slugSegment === path[0])?.findNode(path.slice(1))
+  }
+
   /**
    * Filter trie nodes. Behaves similar to `Array.prototype.filter()`, but modifies tree in place
    */

--
Gitblit v1.10.0