rendering, link resolution, asset copying

This commit is contained in:
Jacky Zhao 2023-05-31 17:01:23 -04:00
parent ad6ce0d73f
commit 21c007e2fc
19 changed files with 564 additions and 274 deletions
quartz/processors

View file

@ -6,7 +6,7 @@ import { Root as HTMLRoot } from 'hast'
import { ProcessedContent } from '../plugins/vfile'
import { PerfTimer } from '../perf'
import { read } from 'to-vfile'
import { pathToSlug } from '../path'
import { slugify } from '../path'
import path from 'path'
import { QuartzTransformerPlugin } from '../plugins/types'
@ -39,7 +39,7 @@ export async function parseMarkdown(processor: QuartzProcessor, baseDir: string,
const file = await read(fp)
// base data properties that plugins may use
file.data.slug = pathToSlug(path.relative(baseDir, file.path))
file.data.slug = slugify(path.relative(baseDir, file.path))
file.data.filePath = fp
const ast = processor.parse(file)