[breaking?] Allow page-specific cover settings to override site-level settings

Fixes:  #818 #185
This commit is contained in:
Aditya Telange 2023-11-25 18:06:31 +05:30
parent 65d650fc4d
commit b288ede80c
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@
{{- end }} {{- end }}
<article class="{{ $class }}"> <article class="{{ $class }}">
{{- $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) }} {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
<header class="entry-header"> <header class="entry-header">
<h2> <h2>

View File

@ -21,7 +21,7 @@
</div> </div>
{{- end }} {{- end }}
</header> </header>
{{- $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) }} {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- if (.Param "ShowToc") }} {{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }} {{- partial "toc.html" . }}