From 81f716d289533a71aca88d57706c96ef44d939cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91?= <1395348685z@gmail.com> Date: Fri, 18 Jun 2021 13:28:04 +0800 Subject: [PATCH] Add gitter integration in `minify.js` (#300) --- scripts/filters/minify.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/filters/minify.js b/scripts/filters/minify.js index e4f1839..761a51b 100644 --- a/scripts/filters/minify.js +++ b/scripts/filters/minify.js @@ -63,6 +63,10 @@ hexo.extend.filter.register('after_generate', () => { hexo.route.remove('js/third-party/chat/chatra.js'); } + if (!theme.gitter.enable) { + hexo.route.remove('js/third-party/chat/gitter.js'); + } + // Comments if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) { hexo.route.remove('js/third-party/comments/changyan.js');