diff --git a/quartz/processors/parse.ts b/quartz/processors/parse.ts index 3950fee09..2bd530c64 100644 --- a/quartz/processors/parse.ts +++ b/quartz/processors/parse.ts @@ -143,7 +143,7 @@ export async function parseMarkdown(ctx: BuildCtx, fps: FilePath[]): Promise[] = [] for (const chunk of chunks(fps, CHUNK_SIZE)) { - childPromises.push(pool.exec("parseFiles", [argv, chunk, ctx.allSlugs])) + childPromises.push(pool.exec("parseFiles", [ctx.buildId, argv, chunk, ctx.allSlugs])) } const results: ProcessedContent[][] = await WorkerPromise.all(childPromises).catch((err) => { diff --git a/quartz/worker.ts b/quartz/worker.ts index b92bdac94..a209df9a0 100644 --- a/quartz/worker.ts +++ b/quartz/worker.ts @@ -7,8 +7,14 @@ import { createFileParser, createProcessor } from "./processors/parse" import { options } from "./util/sourcemap" // only called from worker thread -export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: FullSlug[]) { +export async function parseFiles( + buildId: string, + argv: Argv, + fps: FilePath[], + allSlugs: FullSlug[], +) { const ctx: BuildCtx = { + buildId, cfg, argv, allSlugs,