Explorer doesn't refresh page when moving between index.md pages.
Describe the bug
When Explorer is configured with:
Component.Explorer({
folderClickBehavior: "link",
})
and you attempt to move between two Folder pages in Explorer, the web browser does not update.
To Reproduce
git clone [email protected]:djotto/quartz.git
cd quartz
npm i
npx quartz build --serve
- Navigate to http://localhost:8080
- Click "Things"
- You will see the text "This page is Things/index.md"
- Click "Places"
Actual result: You will see the text "This page is Things/index.md"
Expected result: You will see the text "This page is Places/index.md"
If you click on a Content page (eg Unrelated) between the two folder clicks, you get the correct behaviour. Problem only surfaces when navigating between two Folder pages.
Expected behavior
When clicking between Folder pages in Explorer, the content should update.
Desktop (please complete the following information):
- Quartz Version: HEAD of v4
-
nodeVersion: v22.9.0 -
npmversion: 10.8.3 - OS: Sonoma 14.7 (23H124)
- Browser Firefox 131.0.2 (64-bit), Chrome 129.0.6668.101, Safari 17.6
Additional context
The only changes I've made on top of v4 for this bug demo are:
diff --git a/quartz.layout.ts b/quartz.layout.ts
index 4a78256..1742edc 100644
--- a/quartz.layout.ts
+++ b/quartz.layout.ts
@@ -27,7 +27,12 @@ export const defaultContentPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
- Component.DesktopOnly(Component.Explorer()),
+ Component.DesktopOnly(Component.Explorer({
+ folderClickBehavior: "link",
+ filterFn: (node) => {
+ return !["People"].includes(node.name);
+ }
+ })),
],
right: [
Component.Graph(),
Thanks for the report. I'll look into it.
@saberzero1 check folderpage and tagpage behavior regarding filters.
@saberzero1 I've updated the example to include tag pages. Behaviour also occurs on tag pages.
fixed now