diff --git a/layouts/partials/summary-with-image.html b/layouts/_default/summary-with-image.html similarity index 58% rename from layouts/partials/summary-with-image.html rename to layouts/_default/summary-with-image.html index 15fa5c2..d4584be 100644 --- a/layouts/partials/summary-with-image.html +++ b/layouts/_default/summary-with-image.html @@ -4,14 +4,13 @@
{{ if $featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} - {{ $featured_image := (trim $featured_image "/") | absURL }} -
+ {{ end }} -
+

{{ .Title }} @@ -21,9 +20,12 @@

- {{ $.Param "read_more_copy" | default (i18n "readMore") }} - {{/* TODO: add author -

By {{ .Author }}

*/}} + {{ with .Params.author | default .Site.Params.author }} +

+ {{ partial "multiple-authors.html" . }} +

+ {{- end -}} + {{ $.Param "read_more_copy" | default (i18n "readMore") }}

diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..03828c6 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,20 @@ +
+
+ {{with .CurrentSection.Title }}{{ . }}{{end}} +

+ + {{ .Title }} + +

+ {{ partial "custom-date.html" . }} + + {{ with .Params.author | default .Site.Params.author }} +

+ {{ partial "multiple-authors.html" . }} +

+ {{- end -}} + {{ $.Param "read_more_copy" | default (i18n "readMore") }} +
+
diff --git a/layouts/partials/multiple-authors.html b/layouts/partials/multiple-authors.html new file mode 100644 index 0000000..39794b6 --- /dev/null +++ b/layouts/partials/multiple-authors.html @@ -0,0 +1,6 @@ +By  +{{- if reflect.IsSlice . -}} + {{ delimit . ", " | markdownify }} +{{- else -}} + {{ . | markdownify }} +{{- end -}} diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html deleted file mode 100644 index ba5df27..0000000 --- a/layouts/partials/summary.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
- {{ humanize .Section }} -

- - {{ .Title }} - -

- {{ partial "custom-date.html" . }} - -
-