From 5232d09af520e12bc421cf19ae5d231a7e36cd4d Mon Sep 17 00:00:00 2001
From: ArtfulAzeria <146041757+ArtfulAzeria@users.noreply.github.com>
Date: Fri, 29 Sep 2023 18:17:48 +0000
Subject: [PATCH] feat: Better and more responsive tag behavior (#515)
---
quartz/plugins/emitters/tagPage.tsx | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/quartz/plugins/emitters/tagPage.tsx b/quartz/plugins/emitters/tagPage.tsx
index de07623..6afde2f 100644
--- a/quartz/plugins/emitters/tagPage.tsx
+++ b/quartz/plugins/emitters/tagPage.tsx
@@ -6,11 +6,11 @@
import { ProcessedContent, defaultProcessedContent } from "../vfile"
import { FullPageLayout } from "../../cfg"
import {
- CanonicalSlug,
FilePath,
- ServerSlug,
+ FullSlug,
getAllSegmentPrefixes,
joinSegments,
+ pathToRoot,
} from "../../util/path"
import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout"
import { TagContent } from "../../components"
@@ -49,7 +49,7 @@
return [
tag,
defaultProcessedContent({
- slug: joinSegments("tags", tag) as ServerSlug,
+ slug: joinSegments("tags", tag) as FullSlug,
frontmatter: { title, tags: [] },
}),
]
@@ -67,8 +67,8 @@
}
for (const tag of tags) {
- const slug = joinSegments("tags", tag) as CanonicalSlug
- const externalResources = pageResources(slug, resources)
+ const slug = joinSegments("tags", tag) as FullSlug
+ const externalResources = pageResources(pathToRoot(slug), resources)
const [tree, file] = tagDescriptions[tag]
const componentData: QuartzComponentProps = {
fileData: file.data,
--
Gitblit v1.10.0