diff --git a/layouts/partials/main/blog-meta.html b/layouts/partials/main/blog-meta.html index a9eb438..d3cc3b7 100644 --- a/layouts/partials/main/blog-meta.html +++ b/layouts/partials/main/blog-meta.html @@ -1 +1,2 @@ -
Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read
\ No newline at end of file +{{ $last := sub (len .Params.contributors) 1 }} +
Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read