From 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 17 Aug 2023 07:55:28 +0000
Subject: [PATCH] various path fixes for links to extensions, fix relative paths in links

---
 quartz/plugins/emitters/contentIndex.ts |   44 ++++++++++++++++++++++++++++----------------
 1 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/quartz/plugins/emitters/contentIndex.ts b/quartz/plugins/emitters/contentIndex.ts
index a94b552..85cdfe7 100644
--- a/quartz/plugins/emitters/contentIndex.ts
+++ b/quartz/plugins/emitters/contentIndex.ts
@@ -1,5 +1,11 @@
 import { GlobalConfiguration } from "../../cfg"
-import { CanonicalSlug, ClientSlug, FilePath, ServerSlug, canonicalizeServer } from "../../path"
+import {
+  CanonicalSlug,
+  ClientSlug,
+  FilePath,
+  ServerSlug,
+  canonicalizeServer,
+} from "../../util/path"
 import { QuartzEmitterPlugin } from "../types"
 import path from "path"
 
@@ -88,19 +94,23 @@
       }
 
       if (opts?.enableSiteMap) {
-        emitted.push(await emit({
-          content: generateSiteMap(cfg, linkIndex),
-          slug: "sitemap" as ServerSlug,
-          ext: ".xml",
-        }))
+        emitted.push(
+          await emit({
+            content: generateSiteMap(cfg, linkIndex),
+            slug: "sitemap" as ServerSlug,
+            ext: ".xml",
+          }),
+        )
       }
 
       if (opts?.enableRSS) {
-        emitted.push(await emit({
-          content: generateRSSFeed(cfg, linkIndex),
-          slug: "index" as ServerSlug,
-          ext: ".xml",
-        }))
+        emitted.push(
+          await emit({
+            content: generateRSSFeed(cfg, linkIndex),
+            slug: "index" as ServerSlug,
+            ext: ".xml",
+          }),
+        )
       }
 
       const fp = path.join("static", "contentIndex") as ServerSlug
@@ -115,11 +125,13 @@
         }),
       )
 
-      emitted.push(await emit({
-        content: JSON.stringify(simplifiedIndex),
-        slug: fp,
-        ext: ".json",
-      }))
+      emitted.push(
+        await emit({
+          content: JSON.stringify(simplifiedIndex),
+          slug: fp,
+          ext: ".json",
+        }),
+      )
 
       return emitted
     },

--
Gitblit v1.10.0