Skip to content

Commit

Permalink
Fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
freenandes committed Jul 1, 2024
1 parent cf23174 commit 5eab8e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions quartz/plugins/transformers/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =

// url.resolve is considered legacy
// WHATWG equivalent https://nodejs.dev/en/api/v18/url/#urlresolvefrom-to
const url = new URL(dest, `https://base.com/${curSlug}`)
const url = new URL(dest, `https://base.com/${curSlug}/`)
const canonicalDest = url.pathname
const [destCanonical, _destAnchor] = splitAnchor(canonicalDest)

Expand Down Expand Up @@ -100,7 +100,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
dest,
transformOptions,
)
node.properties.src = dest
const url = new URL(dest, `https://base.com/${curSlug}/`)
node.properties.src = url.pathname
}
}
})
Expand Down

0 comments on commit 5eab8e3

Please sign in to comment.