mirror of
https://github.com/alrayyes/wiki.git
synced 2025-04-30 22:24:14 +00:00
improve path resolution stability
This commit is contained in:
parent
c874e7e937
commit
dd47be1bc6
5 changed files with 8 additions and 7 deletions
quartz/plugins/transformers
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue