From 2dc0ae279cae87e37c94c42d4ad87107f2a5b5d2 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 17 Aug 2023 05:09:11 +0000
Subject: [PATCH] fix import paths
---
quartz/plugins/emitters/assets.ts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/quartz/plugins/emitters/assets.ts b/quartz/plugins/emitters/assets.ts
index 8ea3055..44bb718 100644
--- a/quartz/plugins/emitters/assets.ts
+++ b/quartz/plugins/emitters/assets.ts
@@ -1,8 +1,8 @@
-import { FilePath, joinSegments, slugifyFilePath } from "../../path"
+import { FilePath, joinSegments, slugifyFilePath } from "../../util/path"
import { QuartzEmitterPlugin } from "../types"
import path from "path"
import fs from "fs"
-import { glob } from "../../glob"
+import { glob } from "../../util/glob"
export const Assets: QuartzEmitterPlugin = () => {
return {
@@ -12,7 +12,7 @@
},
async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
// glob all non MD/MDX/HTML files in content folder and copy it over
- const assetsPath = joinSegments(argv.output, "assets")
+ const assetsPath = argv.output
const fps = await glob("**", argv.directory, ["**/*.md", ...cfg.configuration.ignorePatterns])
const res: FilePath[] = []
for (const fp of fps) {
@@ -24,7 +24,7 @@
const dir = path.dirname(dest) as FilePath
await fs.promises.mkdir(dir, { recursive: true }) // ensure dir exists
await fs.promises.copyFile(src, dest)
- res.push(joinSegments("assets", fp) as FilePath)
+ res.push(dest)
}
return res
--
Gitblit v1.10.0