From d66c251a8cc03ad3bdc99c6fd0aa8f2a2b9595fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20D=C3=A9chappe?=
Date: Fri, 27 Dec 2024 15:40:49 +0100
Subject: [PATCH] fix: add a trailing slash for folders to enforce intended
behavior on github pages hosted sites
---
quartz/components/PageList.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/quartz/components/PageList.tsx b/quartz/components/PageList.tsx
index c0538f5fa5468..e2422c90d99d5 100644
--- a/quartz/components/PageList.tsx
+++ b/quartz/components/PageList.tsx
@@ -42,6 +42,8 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort
{list.map((page) => {
const title = page.frontmatter?.title
const tags = page.frontmatter?.tags ?? []
+ const isFolder = tags.includes("folder")
+ const href = resolveRelative(fileData.slug!, page.slug!) + (isFolder ? "/" : "")
return (
@@ -51,7 +53,7 @@ export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort