From 7bde99b4e2d49e30dad1e0d58ccc34c2e7482005 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 14 Aug 2023 00:47:18 +0000
Subject: [PATCH] fix: add trailing slash to local serving
---
quartz/plugins/emitters/contentIndex.ts | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/quartz/plugins/emitters/contentIndex.ts b/quartz/plugins/emitters/contentIndex.ts
index 66cf137..f3a0281 100644
--- a/quartz/plugins/emitters/contentIndex.ts
+++ b/quartz/plugins/emitters/contentIndex.ts
@@ -88,21 +88,23 @@
}
if (opts?.enableSiteMap) {
- await emit({
- content: generateSiteMap(cfg, linkIndex),
- slug: "sitemap" as ServerSlug,
- ext: ".xml",
- })
- emitted.push("sitemap.xml" as FilePath)
+ emitted.push(
+ await emit({
+ content: generateSiteMap(cfg, linkIndex),
+ slug: "sitemap" as ServerSlug,
+ ext: ".xml",
+ }),
+ )
}
if (opts?.enableRSS) {
- await emit({
- content: generateRSSFeed(cfg, linkIndex),
- slug: "index" as ServerSlug,
- ext: ".xml",
- })
- emitted.push("index.xml" as FilePath)
+ emitted.push(
+ await emit({
+ content: generateRSSFeed(cfg, linkIndex),
+ slug: "index" as ServerSlug,
+ ext: ".xml",
+ }),
+ )
}
const fp = path.join("static", "contentIndex") as ServerSlug
@@ -117,12 +119,13 @@
}),
)
- await emit({
- content: JSON.stringify(simplifiedIndex),
- slug: fp,
- ext: ".json",
- })
- emitted.push(`${fp}.json` as FilePath)
+ emitted.push(
+ await emit({
+ content: JSON.stringify(simplifiedIndex),
+ slug: fp,
+ ext: ".json",
+ }),
+ )
return emitted
},
--
Gitblit v1.10.0