From: Lady Date: Tue, 9 Aug 2022 02:22:29 +0000 (-0700) Subject: Only show summary on index if exists X-Git-Tag: 0.1.0~1 X-Git-Url: https://git.ladys.computer/Beorn/commitdiff_plain/091b363982b956dfc7b0395499a6f8dfd7050d7a Only show summary on index if exists --- diff --git a/build.js b/build.js index 785b86f..af75d5b 100755 --- 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 {