From 6681f28af0bb753918699c41ef9a8421f6b7cd08 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 19 Aug 2023 16:55:36 -0700 Subject: [PATCH] fix trailing slash causing folder listing to not fetch content correctly --- quartz/plugins/emitters/folderPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx index 4d22556ca..11b0ace24 100644 --- a/quartz/plugins/emitters/folderPage.tsx +++ b/quartz/plugins/emitters/folderPage.tsx @@ -6,7 +6,7 @@ import { pageResources, renderPage } from "../../components/renderPage" 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 +54,7 @@ export const FolderPage: QuartzEmitterPlugin = (userOpts) => { ) 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] }