« 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:
-rwxr-xr-xupd8.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/upd8.js b/upd8.js
index e8befa6a..8f40c45e 100755
--- a/upd8.js
+++ b/upd8.js
@@ -2377,11 +2377,14 @@ function writeHomepage() {
                 <h2 class="dot-between-spans">
                     ${[
                         strings.link.home('', {text: wikiInfo.shortName, class: 'current', to}),
+                        wikiInfo.features.listings &&
                         strings.link.listingIndex('', {text: strings('listingIndex.title'), to}),
+                        wikiInfo.features.news &&
                         strings.link.newsIndex('', {text: strings('newsIndex.title'), to}),
+                        wikiInfo.features.flashesAndGames &&
                         strings.link.flashIndex('', {text: strings('flashIndex.title'), to}),
                         ...staticPageData.filter(page => page.listed).map(page => strings.link.staticPage(page, {to}))
-                    ].map(link => `<span>${link}</span>`).join('\n')}
+                    ].filter(Boolean).map(link => `<span>${link}</span>`).join('\n')}
                 </h2>
             `
         }