From bb93ac1c83fd8d13593f7f9688de02eba60de913 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 21 Aug 2023 06:50:29 +0000
Subject: [PATCH] docs: fix links to networked thought
---
quartz/plugins/transformers/links.ts | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts
index 5d34fa3..d9c9c7c 100644
--- a/quartz/plugins/transformers/links.ts
+++ b/quartz/plugins/transformers/links.ts
@@ -60,7 +60,8 @@
dest,
transformOptions,
)
- const canonicalDest = path.posix.normalize(joinSegments(curSlug, dest))
+ const url = new URL(dest, `https://base.com/${curSlug}`)
+ const canonicalDest = url.pathname
const [destCanonical, _destAnchor] = splitAnchor(canonicalDest)
const simple = simplifySlug(destCanonical as FullSlug)
outgoing.add(simple)
--
Gitblit v1.10.0