From fe353d946bd90d38647a9dceff7ea85d425e8a83 Mon Sep 17 00:00:00 2001
From: kabirgh <15871468+kabirgh@users.noreply.github.com>
Date: Fri, 09 Feb 2024 15:07:32 +0000
Subject: [PATCH] feat(experimental): partial rebuilds (#716)
---
quartz/util/path.ts | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/quartz/util/path.ts b/quartz/util/path.ts
index 6cedffd..5cd79ba 100644
--- a/quartz/util/path.ts
+++ b/quartz/util/path.ts
@@ -50,7 +50,14 @@
function sluggify(s: string): string {
return s
.split("/")
- .map((segment) => segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q")) // slugify all segments
+ .map((segment) =>
+ segment
+ .replace(/\s/g, "-")
+ .replace(/&/g, "-and-")
+ .replace(/%/g, "-percent")
+ .replace(/\?/g, "")
+ .replace(/#/g, ""),
+ )
.join("/") // always use / as sep
.replace(/\/$/, "")
}
--
Gitblit v1.10.0