From 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 17 Aug 2023 07:55:28 +0000
Subject: [PATCH] various path fixes for links to extensions, fix relative paths in links
---
quartz/plugins/emitters/static.ts | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/quartz/plugins/emitters/static.ts b/quartz/plugins/emitters/static.ts
index 043a461..6f5d19d 100644
--- a/quartz/plugins/emitters/static.ts
+++ b/quartz/plugins/emitters/static.ts
@@ -1,8 +1,7 @@
-import { FilePath, QUARTZ, joinSegments } from "../../path"
+import { FilePath, QUARTZ, joinSegments } 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 Static: QuartzEmitterPlugin = () => ({
name: "Static",
@@ -10,9 +9,9 @@
return []
},
async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
- const staticPath = path.join(QUARTZ, "static")
+ const staticPath = joinSegments(QUARTZ, "static")
const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns)
await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), { recursive: true })
- return fps.map((fp) => joinSegments("static", fp)) as FilePath[]
+ return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[]
},
})
--
Gitblit v1.10.0