mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-03 23:32:23 +00:00
fix: use slugs instead of title as basis for explorer (#652)
* use slugs instead of title as basis for explorer * fix folder persist state, better default behaviour * use relative path instead of full path as full path is affected by -d * dont use title in breadcrumb if it's just index lol
This commit is contained in:
parent
63bf1e14b5
commit
504b447162
7 changed files with 110 additions and 90 deletions
quartz/processors
|
@ -91,8 +91,9 @@ export function createFileParser(ctx: BuildCtx, fps: FilePath[]) {
|
|||
}
|
||||
|
||||
// base data properties that plugins may use
|
||||
file.data.slug = slugifyFilePath(path.posix.relative(argv.directory, file.path) as FilePath)
|
||||
file.data.filePath = fp
|
||||
file.data.filePath = file.path as FilePath
|
||||
file.data.relativePath = path.posix.relative(argv.directory, file.path) as FilePath
|
||||
file.data.slug = slugifyFilePath(file.data.relativePath)
|
||||
|
||||
const ast = processor.parse(file)
|
||||
const newAst = await processor.run(ast, file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue