From b288ede80cbd70151e2f07f2e09ad6258e64f7fa Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:06:31 +0530 Subject: [PATCH] [breaking?] Allow page-specific cover settings to override site-level settings Fixes: #818 #185 --- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9c5bc54d..833f9239 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -64,7 +64,7 @@ {{- end }}
- {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} + {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b7497255..ee0fec43 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -21,7 +21,7 @@ {{- end }}

- {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }} + {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} {{- if (.Param "ShowToc") }} {{- partial "toc.html" . }}