]> Lady’s Gitweb - Beorn/commitdiff
Only show summary on index if exists
authorLady <redacted>
Tue, 9 Aug 2022 02:22:29 +0000 (19:22 -0700)
committerLady <redacted>
Sat, 29 Apr 2023 03:43:42 +0000 (20:43 -0700)
build.js

index 785b86f94b9db7e39c28ffd0f381725e15ae1d81..af75d5b06308e62687cf8d8f6631150eaf7f0766 100755 (executable)
--- a/build.js
+++ b/build.js
@@ -403,13 +403,19 @@ const applyMetadata = (node, metadata) => {
       // This entry does not have a publication date.
       /* do nothing */
     }
-    addContent(contentElement, "\n");
-    addContent(
-      contentElement.appendChild(
-        LMN.div.property(`${DC11}abstract`)``,
-      ),
-      summary,
-    );
+    if (summary) {
+      // This entry has a summary.
+      addContent(contentElement, "\n");
+      addContent(
+        contentElement.appendChild(
+          LMN.div.property(`${DC11}abstract`)``,
+        ),
+        summary,
+      );
+    } else {
+      // This entry does not have a summary.
+      /* do nothing */
+    }
     addContent(contentElement, "\n");
     addContent(node, "\n");
   } else {
This page took 0.028301 seconds and 4 git commands to generate.