Merge pull request #18 from PR0M3TH3AN/codex/update-asset-copying-in-build-process

Copy assets into build output
This commit is contained in:
thePR0M3TH3AN
2025-07-10 12:54:27 -04:00
committed by GitHub

View File

@@ -154,6 +154,14 @@ async function generate({ contentDir = 'content', outputDir = '_site', configPat
} }
await fs.promises.copyFile(srcPath, destPath); 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 }; module.exports = { generate, buildNav };