From eab5c805c7e30341c6c503c576d3a4f1a8f4ccf0 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 1 Jan 2017 22:24:35 +0800 Subject: [PATCH] Use cache. With this change, the generation time shorts from 3 min to 3 s for about 800 files. Reference: https://github.com/hexojs/hexo/issues/1769 --- layout/base.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/base.jade b/layout/base.jade index 77f89cc24..fb651693f 100644 --- a/layout/base.jade +++ b/layout/base.jade @@ -51,11 +51,11 @@ html(lang='#{config.language}') if theme.widgets_on_small_screens .pure-u-1.pure-u-md-1-4: #sidebar each item in theme.widgets - != partial('_widget/' + item + '.jade') + != partial('_widget/' + item + '.jade', null, {cache: !config.relative_link}) else .pure-u-1-4.hidden_mid_and_down: #sidebar each item in theme.widgets - != partial('_widget/' + item + '.jade') + != partial('_widget/' + item + '.jade', null, {cache: !config.relative_link}) .pure-u-1.pure-u-md-3-4 != partial('_partial/footer.jade')