« get me outta code hell

remove [[news]] hack, auto-add news sidebar - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/write/page-template.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-03-01 23:35:56 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-03-01 23:35:56 -0400
commit55b16f303f23e286dfdf33e5d84fe3981f643746 (patch)
tree7aa33df6c54e84cebaa81baee2b12db09db17413 /src/write/page-template.js
parent8b9e855c57c8879934f9ccc8fa17f73966465a17 (diff)
remove [[news]] hack, auto-add news sidebar
Diffstat (limited to 'src/write/page-template.js')
-rw-r--r--src/write/page-template.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/write/page-template.js b/src/write/page-template.js
index e0b37d49..663c1d90 100644
--- a/src/write/page-template.js
+++ b/src/write/page-template.js
@@ -242,6 +242,7 @@ export function generateDocumentHTML(pageInfo, {
       : multiple
       ? html.tag('div',
           {
+            [html.onlyIfContent]: true,
             id,
             class: [
               'sidebar-column',
@@ -252,6 +253,7 @@ export function generateDocumentHTML(pageInfo, {
             ],
           },
           multiple
+            .filter(Boolean)
             .map((infoOrContent) =>
               (typeof infoOrContent === 'object' && !Array.isArray(infoOrContent))
                 ? infoOrContent