From 29cb8a1bc4e9c98f90cafc569726e49b7d2fd369 Mon Sep 17 00:00:00 2001 From: razonyang Date: Wed, 5 Jun 2024 00:42:35 +0800 Subject: [PATCH] perf(breadcrumb): cache partial --- .../hb-gallery-breadcrumb/hooks/hb-gallery-main-begin.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/breadcrumb/layouts/partials/hugopress/modules/hb-gallery-breadcrumb/hooks/hb-gallery-main-begin.html b/modules/breadcrumb/layouts/partials/hugopress/modules/hb-gallery-breadcrumb/hooks/hb-gallery-main-begin.html index 0a80f07..b035d01 100644 --- a/modules/breadcrumb/layouts/partials/hugopress/modules/hb-gallery-breadcrumb/hooks/hb-gallery-main-begin.html +++ b/modules/breadcrumb/layouts/partials/hugopress/modules/hb-gallery-breadcrumb/hooks/hb-gallery-main-begin.html @@ -1 +1,5 @@ -{{ partial "hb/modules/breadcrumb/index" .Page }} +{{ if .Page.IsPage }} + {{ partial "hb/modules/breadcrumb/index" .Page }} +{{ else }} + {{ partialCached "hb/modules/breadcrumb/index" .Page .Page.CurrentSection }} +{{ end }}