« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/write/build-modes/static-build.js22
1 files changed, 13 insertions, 9 deletions
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)