From e57d471d246be80418864102ece8125e0d03c7db Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Mon, 14 Oct 2019 13:51:19 +0100 Subject: [PATCH] perf: cache head and header partials - https://hexo.io/docs/templates#Optimization --- themes/chameleon/layout/_partial/article.ejs | 2 +- themes/chameleon/layout/archive.ejs | 2 +- themes/chameleon/layout/category.ejs | 2 +- themes/chameleon/layout/layout.ejs | 2 +- themes/chameleon/layout/tag.ejs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/chameleon/layout/_partial/article.ejs b/themes/chameleon/layout/_partial/article.ejs index 8ee99ea..b26f2de 100644 --- a/themes/chameleon/layout/_partial/article.ejs +++ b/themes/chameleon/layout/_partial/article.ejs @@ -1,5 +1,5 @@
- <%- partial('_partial/header') %> + <%- partial('_partial/header', {}, { cache: true }) %>
<%- partial('post/gallery') %> diff --git a/themes/chameleon/layout/archive.ejs b/themes/chameleon/layout/archive.ejs index 15a760a..7867541 100644 --- a/themes/chameleon/layout/archive.ejs +++ b/themes/chameleon/layout/archive.ejs @@ -1,5 +1,5 @@
- <%- partial('_partial/header') %> + <%- partial('_partial/header', {}, { cache: true }) %>
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
diff --git a/themes/chameleon/layout/category.ejs b/themes/chameleon/layout/category.ejs index e42755a..99c3188 100644 --- a/themes/chameleon/layout/category.ejs +++ b/themes/chameleon/layout/category.ejs @@ -1,5 +1,5 @@
- <%- partial('_partial/header') %> + <%- partial('_partial/header', {}, { cache: true }) %>
<%- partial('_partial/archive', {pagination: config.category, index: true}) %>
diff --git a/themes/chameleon/layout/layout.ejs b/themes/chameleon/layout/layout.ejs index f2b8fe2..1e616fa 100644 --- a/themes/chameleon/layout/layout.ejs +++ b/themes/chameleon/layout/layout.ejs @@ -1,6 +1,6 @@ -<%- partial('_partial/head') %> +<%- partial('_partial/head', {}, { cache: true }) %> <%/* set /about page to use "home" page layout */%> <% if (is_current('about/index.html')) { %> diff --git a/themes/chameleon/layout/tag.ejs b/themes/chameleon/layout/tag.ejs index 89d1963..1986845 100644 --- a/themes/chameleon/layout/tag.ejs +++ b/themes/chameleon/layout/tag.ejs @@ -1,5 +1,5 @@
- <%- partial('_partial/header') %> + <%- partial('_partial/header', {}, { cache: true }) %>
<%- partial('_partial/archive', {pagination: config.tag, index: true}) %>