Jacky Zhao
2023-08-03 de72dd4e4af550cd72847d7cc0924a5859edb9e1
quartz/plugins/transformers/links.ts
@@ -47,6 +47,7 @@
                  return targetCanonical === fileName
                })
                // only match, just use it
                if (matchingFileNames.length === 1) {
                  const targetSlug = canonicalizeServer(matchingFileNames[0])
                  return (resolveRelative(curSlug, targetSlug) + targetAnchor) as RelativeURL
@@ -99,7 +100,7 @@
                if (!isAbsoluteUrl(node.properties.src)) {
                  const ext = path.extname(node.properties.src)
                  node.properties.src =
                    transformLink(path.join("assets", node.properties.src)) + ext
                    transformLink(joinSegments("assets", node.properties.src)) + ext
                }
              }
            })