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:
Aditya Telange 2020-12-29 16:44:03 +05:30
parent e252e761f5
commit c9fa6c7915
No known key found for this signature in database
GPG key ID: 82E844EF3DA99E77
3 changed files with 5 additions and 3 deletions

View file

@ -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)) }}