fix asset path

This commit is contained in:
thePR0M3TH3AN
2025-07-10 13:28:54 -04:00
parent 51a57e37b1
commit a74842037b

View File

@@ -176,11 +176,9 @@ async function generate({ contentDir = 'content', outputDir = '_site', configPat
}
// Copy the main assets directory (theme, js, etc.)
const mainAssetsSrc = path.resolve(
configPath ? path.dirname(configPath) : process.cwd(),
'..',
'assets'
);
// Always resolve assets relative to the DocForge package so it works
// regardless of the current working directory or config location.
const mainAssetsSrc = path.resolve(__dirname, '../../assets');
const mainAssetsDest = path.join(outputDir, 'assets');
if (fs.existsSync(mainAssetsSrc)) {