mirror of
https://github.com/PR0M3TH3AN/Archivox.git
synced 2025-09-07 14:48:40 +00:00
Merge pull request #18 from PR0M3TH3AN/codex/update-asset-copying-in-build-process
Copy assets into build output
This commit is contained in:
@@ -154,6 +154,14 @@ async function generate({ contentDir = 'content', outputDir = '_site', configPat
|
||||
}
|
||||
await fs.promises.copyFile(srcPath, destPath);
|
||||
}
|
||||
|
||||
// Copy project level assets folder into output
|
||||
const projectAssets = path.resolve(__dirname, '..', '..', 'assets');
|
||||
if (fs.existsSync(projectAssets)) {
|
||||
const dest = path.join(outputDir, 'assets');
|
||||
await fs.promises.mkdir(dest, { recursive: true });
|
||||
await fs.promises.cp(projectAssets, dest, { recursive: true });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { generate, buildNav };
|
||||
|
Reference in New Issue
Block a user