improve path resolution stability

This commit is contained in:
Jacky Zhao committed 2023-08-19 16:28:44 -07:00
1 parent c874e7e937
commit dd47be1bc6
5 files changed
+8 -7

No files matched your search

+2 -1
View File
@@ -60,7 +60,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
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)