From 98eb6e7afe2e991733a31943d33dafbd2ee0189f Mon Sep 17 00:00:00 2001 From: razonyang Date: Wed, 5 Jun 2024 00:43:30 +0800 Subject: [PATCH] perf: cache partials --- layouts/partials/hb/modules/breadcrumb/ancestor.html | 8 ++++++++ layouts/partials/hb/modules/breadcrumb/ancestors.html | 3 +++ layouts/partials/hb/modules/breadcrumb/index.html | 11 +---------- 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 layouts/partials/hb/modules/breadcrumb/ancestor.html create mode 100644 layouts/partials/hb/modules/breadcrumb/ancestors.html diff --git a/layouts/partials/hb/modules/breadcrumb/ancestor.html b/layouts/partials/hb/modules/breadcrumb/ancestor.html new file mode 100644 index 0000000..5858d56 --- /dev/null +++ b/layouts/partials/hb/modules/breadcrumb/ancestor.html @@ -0,0 +1,8 @@ + diff --git a/layouts/partials/hb/modules/breadcrumb/ancestors.html b/layouts/partials/hb/modules/breadcrumb/ancestors.html new file mode 100644 index 0000000..b21b71d --- /dev/null +++ b/layouts/partials/hb/modules/breadcrumb/ancestors.html @@ -0,0 +1,3 @@ +{{- range .Reverse }} + {{ partialCached "hb/modules/breadcrumb/ancestor" . . }} +{{- end -}} diff --git a/layouts/partials/hb/modules/breadcrumb/index.html b/layouts/partials/hb/modules/breadcrumb/index.html index 6153897..a7722e9 100644 --- a/layouts/partials/hb/modules/breadcrumb/index.html +++ b/layouts/partials/hb/modules/breadcrumb/index.html @@ -2,16 +2,7 @@