From 2aac60ff32ea7bc4533c163bc775fbf19ea9e370 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Wed, 9 Apr 2025 10:32:13 +0200 Subject: [PATCH] fix: title partial caching --- layouts/partials/item-tile.html | 6 +++++- layouts/partials/items-grid.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/partials/item-tile.html b/layouts/partials/item-tile.html index 7c10329..c7c265a 100644 --- a/layouts/partials/item-tile.html +++ b/layouts/partials/item-tile.html @@ -86,7 +86,11 @@ {{ end }} - {{- partialCached "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) .File.Filename -}} + {{- with .File -}} + {{- partialCached "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) .Filename -}} + {{- else -}} + {{- partial "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) -}} + {{- end -}}

diff --git a/layouts/partials/items-grid.html b/layouts/partials/items-grid.html index c656b79..959d1b7 100644 --- a/layouts/partials/items-grid.html +++ b/layouts/partials/items-grid.html @@ -4,7 +4,7 @@ {{ partialCached "header-tile.html" . .Key }} {{ range .Pages }} {{ if ( not ( .IsDescendant ( .GetPage "/cv/roles" ) ) ) }} - {{ partialCached "item-tile.html" . .Path }} + {{ partial "item-tile.html" . }} {{ end }} {{ end }} {{ end }}