From 42d3a7de1711bbd40a2b6857e3bf7ff17685f5d9 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 01 Jun 2023 21:35:31 +0000
Subject: [PATCH] scss support
---
quartz/processors/emit.ts | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/quartz/processors/emit.ts b/quartz/processors/emit.ts
index e6e734e..5f4b46c 100644
--- a/quartz/processors/emit.ts
+++ b/quartz/processors/emit.ts
@@ -8,7 +8,7 @@
import { QUARTZ, slugify } from "../path"
import { globbyStream } from "globby"
-export async function emitContent(output: string, cfg: QuartzConfig, content: ProcessedContent[], verbose: boolean) {
+export async function emitContent(contentFolder: string, output: string, cfg: QuartzConfig, content: ProcessedContent[], verbose: boolean) {
const perf = new PerfTimer()
@@ -23,7 +23,7 @@
let emittedFiles = 0
for (const emitter of cfg.plugins.emitters) {
- const emitted = await emitter.emit(content, staticResources, emit)
+ const emitted = await emitter.emit(cfg.configuration, content, staticResources, emit)
emittedFiles += emitted.length
if (verbose) {
@@ -39,11 +39,11 @@
// glob all non MD/MDX/HTML files in content folder and copy it over
const assetsPath = path.join("public", "assets")
for await (const fp of globbyStream("**", {
- ignore: ["**/*.{md,mdx,html}"],
- cwd: "./content",
+ ignore: ["**/*.md"],
+ cwd: contentFolder,
})) {
const ext = path.extname(fp as string)
- const src = path.join("content", fp as string)
+ const src = path.join(contentFolder, fp as string)
const dest = path.join(assetsPath, slugify(fp as string) + ext)
const dir = path.dirname(dest)
await fs.promises.mkdir(dir, { recursive: true }) // ensure dir exists
--
Gitblit v1.10.0