various path fixes for links to extensions, fix relative paths in links
This commit is contained in:
		@@ -36,6 +36,7 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options> | und
 | 
			
		||||
              } else if (source === "frontmatter" && file.data.frontmatter) {
 | 
			
		||||
                created ||= file.data.frontmatter.date
 | 
			
		||||
                modified ||= file.data.frontmatter.lastmod
 | 
			
		||||
                modified ||= file.data.frontmatter.updated
 | 
			
		||||
                modified ||= file.data.frontmatter["last-modified"]
 | 
			
		||||
                published ||= file.data.frontmatter.publishDate
 | 
			
		||||
              } else if (source === "git") {
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
 
 | 
			
		||||
@@ -196,7 +196,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
 | 
			
		||||
              // embed cases
 | 
			
		||||
              if (value.startsWith("!")) {
 | 
			
		||||
                const ext: string = path.extname(fp).toLowerCase()
 | 
			
		||||
                const url = slugifyFilePath(fp as FilePath) + ext
 | 
			
		||||
                const url = slugifyFilePath(fp as FilePath)
 | 
			
		||||
                if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) {
 | 
			
		||||
                  const dims = alias ?? ""
 | 
			
		||||
                  let [width, height] = dims.split("x", 2)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user