fix: use proper full base for links.ts

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

View file

@ -11,7 +11,6 @@ Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility
[Join the Discord Community](https://discord.gg/cRFFHYye7t)
## Sponsors
<p align="center">

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)