From e47c29d2fd4eae06c511c914e2a5fcb057b44d7b Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 19 Aug 2024 21:14:29 +0000
Subject: [PATCH] chore(deps): bump rehype-katex from 7.0.0 to 7.0.1 (#1356)
---
quartz/build.ts | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/quartz/build.ts b/quartz/build.ts
index d72b8dd..342a27c 100644
--- a/quartz/build.ts
+++ b/quartz/build.ts
@@ -38,8 +38,13 @@
type FileEvent = "add" | "change" | "delete"
+function newBuildId() {
+ return new Date().toISOString()
+}
+
async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
const ctx: BuildCtx = {
+ buildId: newBuildId(),
argv,
cfg,
allSlugs: [],
@@ -167,6 +172,7 @@
const perf = new PerfTimer()
console.log(chalk.yellow("Detected change, rebuilding..."))
+ ctx.buildId = newBuildId()
// UPDATE DEP GRAPH
const fp = joinSegments(argv.directory, toPosixPath(filepath)) as FilePath
@@ -309,6 +315,8 @@
}
await rimraf([...destinationsToDelete])
+ console.log(chalk.green(`Done rebuilding in ${perf.timeSince()}`))
+
toRemove.clear()
release()
clientRefresh()
@@ -361,14 +369,10 @@
const perf = new PerfTimer()
console.log(chalk.yellow("Detected change, rebuilding..."))
+ ctx.buildId = newBuildId()
+
try {
const filesToRebuild = [...toRebuild].filter((fp) => !toRemove.has(fp))
-
- const trackedSlugs = [...new Set([...contentMap.keys(), ...toRebuild, ...trackedAssets])]
- .filter((fp) => !toRemove.has(fp))
- .map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath))
-
- ctx.allSlugs = [...new Set([...initialSlugs, ...trackedSlugs])]
const parsedContent = await parseMarkdown(ctx, filesToRebuild)
for (const content of parsedContent) {
const [_tree, vfile] = content
@@ -382,6 +386,13 @@
const parsedFiles = [...contentMap.values()]
const filteredContent = filterContent(ctx, parsedFiles)
+ // re-update slugs
+ const trackedSlugs = [...new Set([...contentMap.keys(), ...toRebuild, ...trackedAssets])]
+ .filter((fp) => !toRemove.has(fp))
+ .map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath))
+
+ ctx.allSlugs = [...new Set([...initialSlugs, ...trackedSlugs])]
+
// TODO: we can probably traverse the link graph to figure out what's safe to delete here
// instead of just deleting everything
await rimraf(path.join(argv.output, ".*"), { glob: true })
--
Gitblit v1.10.0