diff --git a/quartz/components/scripts/util.ts b/quartz/components/scripts/util.ts index c1db8ba..ff486cf 100644 --- a/quartz/components/scripts/util.ts +++ b/quartz/components/scripts/util.ts @@ -41,5 +41,5 @@ export async function fetchCanonical(url: URL): Promise { // to allow the caller to read it if it's was not a redirect const text = await res.clone().text() const [_, redirect] = text.match(canonicalRegex) ?? [] - return redirect ? fetch(redirect) : res + return redirect ? fetch(`${new URL(redirect, url)}`) : res }