From c874e7e9378a5ba895870e9680484fb4af5c6e93 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 19 Aug 2023 22:52:25 +0000
Subject: [PATCH] base path refactor to better support subpath hosting
---
quartz/components/pages/TagContent.tsx | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/quartz/components/pages/TagContent.tsx b/quartz/components/pages/TagContent.tsx
index 2cae40d..7b3a582 100644
--- a/quartz/components/pages/TagContent.tsx
+++ b/quartz/components/pages/TagContent.tsx
@@ -3,7 +3,7 @@
import { toJsxRuntime } from "hast-util-to-jsx-runtime"
import style from "../styles/listPage.scss"
import { PageList } from "../PageList"
-import { ServerSlug, canonicalizeServer, getAllSegmentPrefixes } from "../../util/path"
+import { FullSlug, getAllSegmentPrefixes, simplifySlug } from "../../util/path"
import { QuartzPluginData } from "../../plugins/vfile"
const numPages = 10
@@ -15,7 +15,7 @@
throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`)
}
- const tag = canonicalizeServer(slug.slice("tags/".length) as ServerSlug)
+ const tag = simplifySlug(slug.slice("tags/".length) as FullSlug)
const allPagesWithTag = (tag: string) =>
allFiles.filter((file) =>
(file.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes).includes(tag),
--
Gitblit v1.10.0