diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 0d0a35f..91021c4 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -9,7 +9,7 @@ {{ end }} </div> - {{ $image := partial "helper/image" (dict "Context" . "Type" "taxonomy") }} + {{ $image := partialCached "helper/image" (dict "Context" . "Type" "taxonomy") .RelPermalink }} {{ if $image.exists }} <div class="taxonomy-image"> {{ if $image.resource }} diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html index 1a71318..344086e 100644 --- a/layouts/partials/article-list/compact.html +++ b/layouts/partials/article-list/compact.html @@ -12,7 +12,7 @@ </footer> </div> - {{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }} + {{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink }} {{ if $image.exists }} <div class="article-image"> diff --git a/layouts/partials/article-list/default.html b/layouts/partials/article-list/default.html index ccbfba5..29e9daa 100644 --- a/layouts/partials/article-list/default.html +++ b/layouts/partials/article-list/default.html @@ -1,4 +1,4 @@ -{{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }} +{{ $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink }} <article class="{{ if $image.exists }}has-image{{ end }}"> {{ if $image.exists }} <div class="article-image"> diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html index ea38a83..b846681 100644 --- a/layouts/partials/article-list/tile.html +++ b/layouts/partials/article-list/tile.html @@ -1,4 +1,4 @@ -{{ $image := partial "helper/image" (dict "Context" .context "Type" .Type) }} +{{ $image := partialCached "helper/image" (dict "Context" .context "Type" .Type) .context.RelPermalink }} <article class="{{ if $image.exists }}has-image{{ end }}"> <a href="{{ .context.Permalink }}"> diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 1b776be..89d5554 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -1,4 +1,4 @@ -{{ $image := partial "helper/image" (dict "Context" .) }} +{{ $image := partialCached "helper/image" (dict "Context" .) .RelPermalink }} {{ $context := . }} <div class="article-details"> {{ with $categories := .Params.categories }} diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index df7c764..1d2c7dc 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -1,5 +1,5 @@ <header class="article-header"> - {{ $image := partial "helper/image" (dict "Context" . "Type" "article") }} + {{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink }} {{ if $image.exists }} <div class="article-image"> diff --git a/layouts/partials/head/opengraph/provider/base.html b/layouts/partials/head/opengraph/provider/base.html index ea7f084..67c8cb5 100644 --- a/layouts/partials/head/opengraph/provider/base.html +++ b/layouts/partials/head/opengraph/provider/base.html @@ -37,7 +37,7 @@ {{- end -}} {{- end -}} -{{ $image := partial "helper/image" (dict "Context" . "Type" "opengraph") }} +{{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink }} {{- if $image.exists -}} <meta property='og:image' content='{{ absURL $image.permalink }}' /> {{- end -}} \ No newline at end of file diff --git a/layouts/partials/head/opengraph/provider/twitter.html b/layouts/partials/head/opengraph/provider/twitter.html index 707ae2b..6964156 100644 --- a/layouts/partials/head/opengraph/provider/twitter.html +++ b/layouts/partials/head/opengraph/provider/twitter.html @@ -8,7 +8,7 @@ <meta name="twitter:title" content="{{ $title }}"> <meta name="twitter:description" content="{{ $description }}"> -{{- $image := partial "helper/image" (dict "Context" . "Type" "opengraph") -}} +{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink -}} {{- if $image.exists -}} <meta name="twitter:card" content="{{ .Site.Params.opengraph.twitter.card }}"> <meta name="twitter:image" content='{{ absURL $image.permalink }}' />