various path fixes for links to extensions, fix relative paths in links

This commit is contained in:
Jacky Zhao 2023-08-17 00:55:28 -07:00
parent 2dc0ae279c
commit 0c199975f2
16 changed files with 77 additions and 52 deletions
quartz/plugins/transformers

View file

@ -79,9 +79,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
) {
if (!isAbsoluteUrl(node.properties.src)) {
let dest = node.properties.src as RelativeURL
const ext = path.extname(node.properties.src)
dest = node.properties.src = transformLink(curSlug, dest, transformOptions)
node.properties.src = dest + ext
node.properties.src = dest
}
}
})