diff --git a/layouts/partials/authors.html b/layouts/partials/authors.html new file mode 100644 index 000000000..9b3b93690 --- /dev/null +++ b/layouts/partials/authors.html @@ -0,0 +1,4 @@ +{{ $authors := .Param "authors" | len }} +{{ range $index, $author := .Param "authors" }} + {{ if and (eq (add $index 1) $authors) (gt $authors 1) }} and {{ end }}{{ . }}{{ if and (gt $authors 2) (lt (add $index 1) $authors) }}, {{ end }} +{{ end }} diff --git a/layouts/partials/patterns-index.html b/layouts/partials/patterns-index.html index 0ff2740f9..8aa3c6baa 100644 --- a/layouts/partials/patterns-index.html +++ b/layouts/partials/patterns-index.html @@ -10,7 +10,7 @@