From e4e85ecb29867b6a1d234812ebe24828b76464ac Mon Sep 17 00:00:00 2001
From: WingLim <643089849@qq.com>
Date: Sat, 25 Sep 2021 13:19:29 +0800
Subject: [PATCH] feat: cache some partials
---
layouts/404.html | 6 +++---
layouts/_default/baseof.html | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/layouts/404.html b/layouts/404.html
index 24409fd9..53d4cbdb 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,5 +1,5 @@
-{{ partial "head/head" . }}
-{{ partial "header" . }}
+{{ partialCached "head/head" . }}
+{{ partialCached "header" . }}
@@ -7,4 +7,4 @@ 404 NOT FOUND
-{{ partial "footer/footer" . }}
+{{ partialCached "footer/footer" . }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4a4a9e2d..df4a1e95 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,13 +1,13 @@
- {{ partial "head/head" . }}
- {{ partial "head/colorScheme" . }}
+ {{ partialCached "head/head" . }}
+ {{ partialCached "head/colorScheme" . }}
- {{ partial "header.html" . }}
+ {{ partialCached "header.html" . }}
{{ block "main" . }}{{ end }}
- {{ partial "footer/footer" . }}
+ {{ partialCached "footer/footer" . }}
\ No newline at end of file