Jacky Zhao
2023-08-17 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b
quartz/plugins/emitters/tagPage.tsx
@@ -11,7 +11,7 @@
  ServerSlug,
  getAllSegmentPrefixes,
  joinSegments,
} from "../../path"
} from "../../util/path"
import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout"
import { TagContent } from "../../components"
@@ -41,7 +41,7 @@
        allFiles.flatMap((data) => data.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes),
      )
      // add base tag
      tags.add("")
      tags.add("index")
      const tagDescriptions: Record<string, ProcessedContent> = Object.fromEntries(
        [...tags].map((tag) => {
@@ -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]
          }