From e1dd6aee863878a02f51200b3878d619220c22f3 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 12 Aug 2023 06:55:17 +0000
Subject: [PATCH] fix wikilinks to anchors in the same document

---
 quartz/plugins/emitters/tagPage.tsx |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/quartz/plugins/emitters/tagPage.tsx b/quartz/plugins/emitters/tagPage.tsx
index ae231d6..fd00d9c 100644
--- a/quartz/plugins/emitters/tagPage.tsx
+++ b/quartz/plugins/emitters/tagPage.tsx
@@ -49,7 +49,7 @@
           return [
             tag,
             defaultProcessedContent({
-              slug: joinSegments("tags", tag, "index") as ServerSlug,
+              slug: joinSegments("tags", tag) as ServerSlug,
               frontmatter: { title, tags: [] },
             }),
           ]
@@ -59,7 +59,7 @@
       for (const [tree, file] of content) {
         const slug = file.data.slug!
         if (slug.startsWith("tags/")) {
-          const tag = joinSegments(slug.slice("tags/".length), "index")
+          const tag = slug.slice("tags/".length)
           if (tags.has(tag)) {
             tagDescriptions[tag] = [tree, file]
           }
@@ -80,9 +80,7 @@
         }
 
         const content = renderPage(slug, componentData, opts, externalResources)
-
-        const fp = (file.data.slug + ".html") as FilePath
-        await emit({
+        const fp = await emit({
           content,
           slug: file.data.slug!,
           ext: ".html",

--
Gitblit v1.10.0