From 3068647f5877f9f71d0c26d71792da2aa443bac3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 4 Oct 2020 18:40:39 +0530 Subject: post-cover: use new format usage => in page-vars front-matter cover: image: '' alt: '' --- layouts/_default/single.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'layouts/_default/single.html') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7cdea8c..7d688e3 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 }} -- cgit v1.2.3