mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +00:00
feat: deref symlinks when copying static assets (closes #588)
This commit is contained in:
parent
2de48b267a
commit
8fc7b9f4c6
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ export const Static: QuartzEmitterPlugin = () => ({
|
||||||
async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
|
async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
|
||||||
const staticPath = joinSegments(QUARTZ, "static")
|
const staticPath = joinSegments(QUARTZ, "static")
|
||||||
const fps = await glob("**", staticPath, cfg.configuration.ignorePatterns)
|
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[]
|
return fps.map((fp) => joinSegments(argv.output, "static", fp)) as FilePath[]
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue