summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/single.html5
2 files changed, 10 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index ecb3f8d..ae8c367 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -32,6 +32,11 @@
{{- $class = "post-entry tag-entry" }}
{{- end }}
<article class="{{ $class }}">
+ {{ if .Params.cover }}
+ <figure class="entry-cover">
+ <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
+ </figure>
+ {{ end }}
<header class="entry-header">
<h2>
{{ .Title }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index f1d2407..a10ce57 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -14,6 +14,11 @@
</div>
{{end}}
</header>
+ {{ if .Params.cover }}
+ <figure class="entry-cover">
+ <img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
+ </figure>
+ {{ end }}
{{ if .Params.ShowToc }}
<div class="toc">
<details>