From f1c9ca495e450ecb62dade70c4b60d86e106f79c Mon Sep 17 00:00:00 2001
From: vintro <77507980+vintrocode@users.noreply.github.com>
Date: Mon, 14 Aug 2023 00:19:50 +0000
Subject: [PATCH] docs: note about existing content at same path on different branches
---
quartz/components/pages/TagContent.tsx | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/quartz/components/pages/TagContent.tsx b/quartz/components/pages/TagContent.tsx
index 2a9dfca..5d30240 100644
--- a/quartz/components/pages/TagContent.tsx
+++ b/quartz/components/pages/TagContent.tsx
@@ -11,7 +11,7 @@
const { tree, fileData, allFiles } = props
const slug = fileData.slug
- if (!slug?.startsWith("tags/")) {
+ if (!(slug?.startsWith("tags/") || slug === "tags")) {
throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`)
}
@@ -44,11 +44,14 @@
return (
<div>
<h2>
- <a class="internal tag-link" href={`./tags/${tag}`}>
+ <a class="internal tag-link" href={`./${tag}`}>
#{tag}
</a>
</h2>
- <p>{pages.length} items with this tag. {pages.length > numPages && `Showing first ${numPages}.`}</p>
+ <p>
+ {pages.length} items with this tag.{" "}
+ {pages.length > numPages && `Showing first ${numPages}.`}
+ </p>
<PageList limit={numPages} {...listProps} />
</div>
)
--
Gitblit v1.10.0