« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generatePageLayout.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index f4b7e7a7..eb9b9dc4 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -21,6 +21,7 @@ export default {
 
   sprawl({wikiInfo}) {
     return {
+      enableSearch: wikiInfo.enableSearch,
       footerContent: wikiInfo.footerContent,
       wikiColor: wikiInfo.color,
       wikiName: wikiInfo.nameShort,
@@ -43,8 +44,10 @@ export default {
     relations.stickyHeadingContainer =
       relation('generateStickyHeadingContainer');
 
-    relations.searchBox =
-      relation('generateSearchSidebarBox');
+    if (sprawl.enableSearch) {
+      relations.searchBox =
+        relation('generateSearchSidebarBox');
+    }
 
     if (sprawl.footerContent) {
       relations.defaultFooterContent =
@@ -394,7 +397,11 @@ export default {
     const leftSidebar = getSidebar('leftSidebar', 'sidebar-left');
     const rightSidebar = getSidebar('rightSidebar', 'sidebar-right');
 
-    if (slots.showSearch && !html.isBlank(leftSidebar)) {
+    if (
+      slots.showSearch &&
+      relations.searchBox &&
+      !html.isBlank(leftSidebar)
+    ) {
       leftSidebar.setSlot('boxes',
         html.tags([
           relations.searchBox,