From f31cabbbf9b0d438710618a3edd2a4eaaae09d7d Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 15 Jan 2024 20:37:56 +0000
Subject: [PATCH] fix: dont use default callout title if theres additional title children left (closes #693)
---
quartz/build.ts | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/quartz/build.ts b/quartz/build.ts
index 58137d1..24f0498 100644
--- a/quartz/build.ts
+++ b/quartz/build.ts
@@ -45,7 +45,7 @@
perf.addEvent("glob")
const allFiles = await glob("**/*.*", argv.directory, cfg.configuration.ignorePatterns)
- const fps = allFiles.filter((fp) => fp.endsWith(".md"))
+ const fps = allFiles.filter((fp) => fp.endsWith(".md")).sort()
console.log(
`Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`,
)
@@ -142,19 +142,23 @@
const parsedFiles = [...contentMap.values()]
const filteredContent = filterContent(ctx, parsedFiles)
+
// TODO: we can probably traverse the link graph to figure out what's safe to delete here
// instead of just deleting everything
await rimraf(argv.output)
await emitContent(ctx, filteredContent)
console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`))
- } catch {
+ } catch (err) {
console.log(chalk.yellow(`Rebuild failed. Waiting on a change to fix the error...`))
+ if (argv.verbose) {
+ console.log(chalk.red(err))
+ }
}
+ release()
clientRefresh()
toRebuild.clear()
toRemove.clear()
- release()
}
const watcher = chokidar.watch(".", {
--
Gitblit v1.10.0