- {{- 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) }}
- {{- partial "cover.html" (dict "cxt" . "IsHome" false) }}
+ {{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- if .Params.ShowToc }}
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html
index 86ee489..5ff16bc 100644
--- a/layouts/partials/cover.html
+++ b/layouts/partials/cover.html
@@ -1,5 +1,5 @@
{{- with .cxt}} {{/* Apply proper context from dict */}}
-{{- if .Params.cover.image }}
+{{- if (and .Params.cover.image (not $.isHidden)) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}