mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
29 lines
598 B
JavaScript
29 lines
598 B
JavaScript
/* global hexo */
|
|
|
|
'use strict';
|
|
|
|
hexo.extend.filter.register('after_generate', () => {
|
|
const theme = hexo.theme.config;
|
|
if (!theme.minify) return;
|
|
|
|
if (!theme.bookmark.enable) {
|
|
hexo.route.remove('js/bookmark.js');
|
|
}
|
|
|
|
if (!theme.motion.enable) {
|
|
hexo.route.remove('js/motion.js');
|
|
}
|
|
|
|
if (!theme.algolia_search.enable) {
|
|
hexo.route.remove('js/algolia-search.js');
|
|
}
|
|
|
|
if (!theme.local_search.enable) {
|
|
hexo.route.remove('js/local-search.js');
|
|
}
|
|
|
|
if (theme.scheme === 'Pisces' || theme.scheme === 'Gemini') {
|
|
hexo.route.remove('js/schemes/muse.js');
|
|
}
|
|
});
|