fix: dont transform external links
This commit is contained in:
		| @@ -54,7 +54,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> = | ||||
|                 node.properties.className.push(isAbsoluteUrl(dest) ? "external" : "internal") | ||||
|  | ||||
|                 // don't process external links or intra-document anchors | ||||
|                 if (!(isAbsoluteUrl(dest) || dest.startsWith("#"))) { | ||||
|                 const isInternal = !(isAbsoluteUrl(dest) || dest.startsWith("#")) | ||||
|                 if (isInternal) { | ||||
|                   dest = node.properties.href = transformLink( | ||||
|                     file.data.slug!, | ||||
|                     dest, | ||||
| @@ -77,6 +78,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> = | ||||
|                 // rewrite link internals if prettylinks is on | ||||
|                 if ( | ||||
|                   opts.prettyLinks && | ||||
|                   isInternal && | ||||
|                   node.children.length === 1 && | ||||
|                   node.children[0].type === "text" && | ||||
|                   !node.children[0].value.startsWith("#") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user