render bib reference without extra dots or commas if there is no pubdate or

publisher in motw collection.
This commit is contained in:
Marcell Mars 2020-03-07 18:21:48 +01:00
parent 4ef05b561f
commit d153a2ec8f
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
{{ if index $.Page.Site.Data.books.piratecarecollection $destination }} {{ if index $.Page.Site.Data.books.piratecarecollection $destination }}
{{ $b := index $.Page.Site.Data.books.piratecarecollection $destination }} {{ $b := index $.Page.Site.Data.books.piratecarecollection $destination }}
{{ if not $text_link }} {{ if not $text_link }}
<span>{{ delimit $b.authors ", " " & " }}, {{ substr $b.pubdate 0 4}}.<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank"><i>{{ $b.title }}</i></a>. {{ $b.publisher }}.</span> <span>{{ delimit $b.authors ", " " & " }}{{ with $b.pubdate }}, {{ substr . 0 4}}{{ end }}.<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank"><i>{{ $b.title }}</i></a>. {{ with $b.publisher }}{{ . }}.{{ end }}</span>
{{ else }} {{ else }}
<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank">{{ $text_link }}</a> <a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank">{{ $text_link }}</a>
{{ end }} {{ end }}