diff options
Diffstat (limited to 'themes/PaperMod/layouts/partials/cover.html')
-rw-r--r-- | themes/PaperMod/layouts/partials/cover.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/PaperMod/layouts/partials/cover.html b/themes/PaperMod/layouts/partials/cover.html index 5c5f2fb..0f8bfbc 100644 --- a/themes/PaperMod/layouts/partials/cover.html +++ b/themes/PaperMod/layouts/partials/cover.html @@ -4,7 +4,9 @@ <figure class="entry-cover"> {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }} - {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $cover := (or $pageBundleCover $globalResourcesCover)}} {{- if $cover -}}{{/* i.e it is present in page bundle */}} {{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank" rel="noopener noreferrer">{{ end -}} |