From b846fd29b379788178abe084473c467b4d35a941 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Dec 2023 17:29:50 -0400 Subject: write: static-build: skip favicon & shared files when not writing all --- src/write/build-modes/static-build.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/write') diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js index a8e0eb23..eb2f6fe3 100644 --- a/src/write/build-modes/static-build.js +++ b/src/write/build-modes/static-build.js @@ -139,15 +139,19 @@ export async function go({ urls, }); - await writeFavicon({ - mediaPath, - outputPath, - }); - - await writeSharedFilesAndPages({ - outputPath, - randomLinkDataJSON: generateRandomLinkDataJSON({wikiData}), - }); + if (writeAll) { + await writeFavicon({ + mediaPath, + outputPath, + }); + + await writeSharedFilesAndPages({ + outputPath, + randomLinkDataJSON: generateRandomLinkDataJSON({wikiData}), + }); + } else { + logInfo`Skipping favicon and shared files (not writing all site pages).` + } const buildSteps = writeAll ? Object.entries(pageSpecs) -- cgit 1.3.0-6-gf8a5