diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b196ae5c..b6ddbfa5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,7 +31,8 @@ {{- $class = "post-entry tag-entry" }} {{- end }}
- {{- 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) }}

{{ .Title }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 607841b0..21e8e793 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -28,7 +28,8 @@ {{- end}}

- {{- 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 86ee4894..5ff16bc0 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) }}
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}