From d153a2ec8fe2a385d0a7ececc552f0c260649008 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Sat, 7 Mar 2020 18:21:48 +0100 Subject: [PATCH] render bib reference without extra dots or commas if there is no pubdate or publisher in motw collection. --- themes/piratecare/layouts/_default/_markup/render-image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/piratecare/layouts/_default/_markup/render-image.html b/themes/piratecare/layouts/_default/_markup/render-image.html index 2b2ae1f..478fd39 100644 --- a/themes/piratecare/layouts/_default/_markup/render-image.html +++ b/themes/piratecare/layouts/_default/_markup/render-image.html @@ -4,7 +4,7 @@ {{ if index $.Page.Site.Data.books.piratecarecollection $destination }} {{ $b := index $.Page.Site.Data.books.piratecarecollection $destination }} {{ if not $text_link }} - {{ delimit $b.authors ", " " & " }}, {{ substr $b.pubdate 0 4}}.‘{{ $b.title }}’. {{ $b.publisher }}. + {{ delimit $b.authors ", " " & " }}{{ with $b.pubdate }}, {{ substr . 0 4}}{{ end }}.‘{{ $b.title }}’. {{ with $b.publisher }}{{ . }}.{{ end }} {{ else }} {{ $text_link }} {{ end }}