fix shortest path for non-md files, mobile fix

This commit is contained in:
Jacky Zhao
2023-08-06 20:52:17 -07:00
parent 22d2d344f2
commit 66e8afb008
4 changed files with 62 additions and 49 deletions

View File

@ -99,9 +99,10 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
typeof node.properties.src === "string"
) {
if (!isAbsoluteUrl(node.properties.src)) {
let dest = node.properties.src as RelativeURL
const ext = path.extname(node.properties.src)
node.properties.src =
transformLink(joinSegments("assets", node.properties.src)) + ext
dest = node.properties.src = transformLink(dest)
node.properties.src = dest + ext
}
}
})