fix: add .Type as second cache key for helper/image
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/12
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{ $image := partialCached "helper/image" (dict "Context" .) .RelPermalink }}
|
||||
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" }}
|
||||
{{ $context := . }}
|
||||
<div class="article-details">
|
||||
{{ with $categories := .Params.categories }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<header class="article-header">
|
||||
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink }}
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "article") .RelPermalink "article" -}}
|
||||
{{ if $image.exists }}
|
||||
<div class="article-image">
|
||||
{{ if $image.resource }}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="related-contents">
|
||||
<div class="flex article-list--tile">
|
||||
{{ range . }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user