Jacky Zhao
2023-08-19 6681f28af0bb753918699c41ef9a8421f6b7cd08
fix trailing slash causing folder listing to not fetch content correctly
1 files modified
4 ■■■■ changed files
quartz/plugins/emitters/folderPage.tsx 4 ●●●● patch | view | raw | blame | history
quartz/plugins/emitters/folderPage.tsx
@@ -6,7 +6,7 @@
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 @@
      )
      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]
        }