diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-12-29 16:44:03 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-12-29 16:44:03 +0530 |
| commit | c9fa6c7915d275cbef1739a5b919e014e18ccb98 (patch) | |
| tree | 45356706a58f0f451100d826ae6535235b6e910d /layouts/partials | |
| parent | e252e761f54f1f871630cdcc5416e90de1ec89d6 (diff) | |
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
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/cover.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 86ee489..5ff16bc 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -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)) }} |
