diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ef3ef296..4a998d3c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,13 +31,13 @@ {{- $class = "post-entry tag-entry" }} {{- end }}
- {{- if .Params.cover }} + {{- if .Params.cover.image }}
- {{ if (or (fileExists (path.Join "static" .Params.cover)) (hasPrefix .Params.cover "http://") (hasPrefix .Params.cover "https://")) }} - cover image for {{ .Title | plainify }} - {{else}} - cover image for {{ .Title | plainify }} - {{end}} + {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} + {{ .Params.cover.alt | plainify }} + {{- else}} + {{ .Params.cover.alt | plainify }} + {{- end}}
{{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7cdea8c9..7d688e37 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -26,13 +26,13 @@ {{- end}}
- {{- if .Params.cover }} + {{- if .Params.cover.image }}
- {{ if (or (fileExists (path.Join "static" .Params.cover)) (hasPrefix .Params.cover "http://") (hasPrefix .Params.cover "https://")) }} - cover image for {{ .Title | plainify }} - {{else}} - cover image for {{ .Title | plainify }} - {{end}} + {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} + {{ .Params.cover.alt | plainify }} + {{- else}} + {{ .Params.cover.alt | plainify }} + {{- end}}
{{- end }} {{- if .Params.ShowToc }}