From df02ea20d7e12e8b9ffdd2968afaf5893c433488 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 11 Aug 2023 04:32:11 +0000
Subject: [PATCH] spacing fix
---
quartz/processors/emit.ts | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/quartz/processors/emit.ts b/quartz/processors/emit.ts
index 570f505..fd32685 100644
--- a/quartz/processors/emit.ts
+++ b/quartz/processors/emit.ts
@@ -4,7 +4,7 @@
import { getStaticResourcesFromPlugins } from "../plugins"
import { EmitCallback } from "../plugins/types"
import { ProcessedContent } from "../plugins/vfile"
-import { FilePath } from "../path"
+import { FilePath, joinSegments } from "../path"
import { QuartzLogger } from "../log"
import { trace } from "../trace"
import { BuildCtx } from "../ctx"
@@ -16,7 +16,7 @@
log.start(`Emitting output files`)
const emit: EmitCallback = async ({ slug, ext, content }) => {
- const pathToPage = path.join(argv.output, slug + ext) as FilePath
+ const pathToPage = joinSegments(argv.output, slug + ext) as FilePath
const dir = path.dirname(pathToPage)
await fs.promises.mkdir(dir, { recursive: true })
await fs.promises.writeFile(pathToPage, content)
@@ -24,7 +24,7 @@
}
let emittedFiles = 0
- const staticResources = getStaticResourcesFromPlugins(cfg.plugins)
+ const staticResources = getStaticResourcesFromPlugins(ctx)
for (const emitter of cfg.plugins.emitters) {
try {
const emitted = await emitter.emit(ctx, content, staticResources, emit)
@@ -37,7 +37,6 @@
}
} catch (err) {
trace(`Failed to emit from plugin \`${emitter.name}\``, err as Error)
- throw err
}
}
--
Gitblit v1.10.0