hugo

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 685cc169ee43ffd247f3a569b979dd99cb061be6
parent 5393b965fdffb89bf14004fbb287810afc89c9a8
Author: Ryan H <git@dredx.com>
Date:   Sun, 11 Dec 2022 20:53:31 -0800

if more than one author it delimits correctly

Diffstat:
Mlayouts/_default/list.html | 17++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -5,13 +5,16 @@ {{ .Content }} <ul> {{- range.Pages }} - <li> - {{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}} - <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{- if .Param "authorsinlist" }} - {{- range .Param "authors" }} by {{ . }}{{ end -}} - {{ end -}} - </li> +<li> + {{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}} + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + {{- if .Param "authorsinlist" }} + {{ with .Params.authors }} + by + {{ delimit . ", " " and " }} + {{end}} + {{ end -}} +</li> {{- end }} </ul> {{- end }}