From a74842037bb0744499f380196e4c1c97b41504bd Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 10 Jul 2025 13:28:54 -0400 Subject: [PATCH] fix asset path --- src/generator/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/generator/index.js b/src/generator/index.js index a3b2bdf..1344764 100644 --- a/src/generator/index.js +++ b/src/generator/index.js @@ -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)) {