Skip to content

Commit

Permalink
Add base url for cf pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikko Miu committed Feb 13, 2024
1 parent 20f98fc commit 5697db0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ async function buildHugo() {
extraArgs.push('--buildFuture');
}

if (!!process.env.CF_PAGES && process.env.CF_PAGES_URL) {
extraArgs.push('--baseURL', process.env.CF_PAGES_URL);
}

const [procName] = common.runProcess('hugo', extraArgs);

await Promise.all([
Expand Down

0 comments on commit 5697db0

Please sign in to comment.