fix: use proper full base for links.ts

This commit is contained in:
Jacky Zhao
2023-08-23 12:18:50 -07:00
parent dbc8c1e441
commit db9f51d2c1
2 changed files with 1 additions and 2 deletions

View File

@ -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, `resolve://${curSlug}`)
const url = new URL(dest, `https://base.com/${curSlug}`)
const canonicalDest = url.pathname
const [destCanonical, _destAnchor] = splitAnchor(canonicalDest)