summaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-29 16:44:03 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-29 16:44:03 +0530
commitc9fa6c7915d275cbef1739a5b919e014e18ccb98 (patch)
tree45356706a58f0f451100d826ae6535235b6e910d /layouts/_default/list.html
parente252e761f54f1f871630cdcc5416e90de1ec89d6 (diff)
cover: granular controls for hiding cover image #156
in site config => params: cover: hidden: true # hide everywhere but not in structured data hiddenInList: true # hide on list pages and home hiddenInSingle: true # hide on single page per-page in front-matter => hidden: true # only hide on current single page
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b196ae5..b6ddbfa 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -31,7 +31,8 @@
{{- $class = "post-entry tag-entry" }}
{{- end }}
<article class="{{ $class }}">
- {{- partial "cover.html" (dict "cxt" . "IsHome" true) }}
+ {{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList)}}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
<header class="entry-header">
<h2>
{{ .Title }}