From c91e62c376d481534d89084e5c04846878dff6d3 Mon Sep 17 00:00:00 2001
From: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
Date: Sun, 27 Aug 2023 00:19:45 +0000
Subject: [PATCH] Fix search bar after navigate (#424)

---
 quartz/plugins/emitters/folderPage.tsx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx
index 4d22556..8d62f7b 100644
--- a/quartz/plugins/emitters/folderPage.tsx
+++ b/quartz/plugins/emitters/folderPage.tsx
@@ -6,7 +6,14 @@
 import { ProcessedContent, defaultProcessedContent } from "../vfile"
 import { FullPageLayout } from "../../cfg"
 import path from "path"
-import { FilePath, FullSlug, SimpleSlug, joinSegments, simplifySlug } from "../../util/path"
+import {
+  FilePath,
+  FullSlug,
+  SimpleSlug,
+  _stripSlashes,
+  joinSegments,
+  simplifySlug,
+} from "../../util/path"
 import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout"
 import { FolderContent } from "../../components"
 
@@ -54,7 +61,7 @@
       )
 
       for (const [tree, file] of content) {
-        const slug = simplifySlug(file.data.slug!)
+        const slug = _stripSlashes(simplifySlug(file.data.slug!)) as SimpleSlug
         if (folders.has(slug)) {
           folderDescriptions[slug] = [tree, file]
         }

--
Gitblit v1.10.0