summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/list.html12
-rw-r--r--layouts/_default/single.html12
2 files changed, 12 insertions, 12 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index ef3ef29..4a998d3 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -31,13 +31,13 @@
{{- $class = "post-entry tag-entry" }}
{{- end }}
<article class="{{ $class }}">
- {{- if .Params.cover }}
+ {{- if .Params.cover.image }}
<figure class="entry-cover">
- {{ if (or (fileExists (path.Join "static" .Params.cover)) (hasPrefix .Params.cover "http://") (hasPrefix .Params.cover "https://")) }}
- <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
- {{else}}
- <img src="{{ .Permalink -}} {{- .Params.cover }}" alt="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://")) }}
+ <img src="{{ .Params.cover.image | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
+ {{- else}}
+ <img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
+ {{- end}}
</figure>
{{- end }}
<header class="entry-header">
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 @@
</div>
{{- end}}
</header>
- {{- if .Params.cover }}
+ {{- if .Params.cover.image }}
<figure class="entry-cover">
- {{ if (or (fileExists (path.Join "static" .Params.cover)) (hasPrefix .Params.cover "http://") (hasPrefix .Params.cover "https://")) }}
- <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
- {{else}}
- <img src="{{ .Permalink -}} {{- .Params.cover }}" alt="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://")) }}
+ <img src="{{ .Params.cover.image | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
+ {{- else}}
+ <img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
+ {{- end}}
</figure>
{{- end }}
{{- if .Params.ShowToc }}