mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-10-24 06:02:33 +02:00
cover: granular controls for hiding cover image #156
in site config =>
params:
cover:
hidden: true # hide everywhere but not in structured data
hiddenInList: true # hide on list pages and home
hiddenInSingle: true # hide on single page
per-page in front-matter =>
hidden: true # only hide on current single page
This commit is contained in:
@@ -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) }}
|
||||
<figure class="entry-cover">
|
||||
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}
|
||||
|
||||
Reference in New Issue
Block a user