From 8fc7b9f4c68bb8c41a156e92cfbddf3144678dcc Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 15 Nov 2023 09:43:30 -0800 Subject: [PATCH] feat: deref symlinks when copying static assets (closes #588) --- quartz/plugins/emitters/static.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quartz/plugins/emitters/static.ts b/quartz/plugins/emitters/static.ts index 6f5d19d..f0118e2 100644 --- a/quartz/plugins/emitters/static.ts +++ b/quartz/plugins/emitters/static.ts @@ -11,7 +11,10 @@ export const Static: QuartzEmitterPlugin = () => ({ async emit({ argv, cfg }, _content, _resources, _emit): Promise { const staticPath = joinSegments(QUARTZ, "static") const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns) - await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), { recursive: true }) + await fs.promises.cp(staticPath, joinSegments(argv.output, "static"), { + recursive: true, + dereference: true, + }) return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[] }, })