From 60a3c543398aed8caf44b411a4dc10e8d1e26fcc Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 13 Sep 2023 04:29:57 +0000
Subject: [PATCH] fix: 404 page styling for nested pages (closes #458)
---
quartz/util/path.ts | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/quartz/util/path.ts b/quartz/util/path.ts
index 1557c1b..1540063 100644
--- a/quartz/util/path.ts
+++ b/quartz/util/path.ts
@@ -123,7 +123,10 @@
}
export function joinSegments(...args: string[]): string {
- return args.filter((segment) => segment !== "").join("/")
+ return args
+ .filter((segment) => segment !== "")
+ .join("/")
+ .replace(/\/\/+/g, "/")
}
export function getAllSegmentPrefixes(tags: string): string[] {
--
Gitblit v1.10.0