Skip to content

Commit

Permalink
[breaking?] Allow page-specific cover settings to override site-level…
Browse files Browse the repository at this point in the history
… settings

Fixes:  #818 #185
  • Loading branch information
adityatelange committed Nov 25, 2023
1 parent 65d650f commit b288ede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1>
{{- end }}

<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) }}
<header class="entry-header">
<h2>
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1 class="post-title">
</div>
{{- end }}
</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) }}
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
Expand Down

0 comments on commit b288ede

Please sign in to comment.