diff --git a/_config.theme.yml b/_config.theme.yml index bf17e33..095505f 100644 --- a/_config.theme.yml +++ b/_config.theme.yml @@ -120,12 +120,12 @@ widgets: position: right # Other plugin settings plugins: + # Enable page animations + animejs: true # Enable the lightGallery and Justified Gallery plugins gallery: true # Enable the Outdated Browser plugin outdated-browser: true - # Enable page animations - animejs: true # Enable the MathJax plugin mathjax: true back-to-top: true diff --git a/scripts/concat.js b/scripts/concat.js index 33e825c..a167738 100644 --- a/scripts/concat.js +++ b/scripts/concat.js @@ -11,7 +11,7 @@ function replaceWithBundled(html) { const $ = cheerio.load(html, { decodeEntities: false }); $('script').each(function () { const url = $(this).attr('src'); - if (url && url.startsWith(urlFor('/js')) && url.endsWith('.js')) { + if (url && url.startsWith(urlFor('/js')) && url.endsWith('.js') && !url.includes('animation')) { $(this).remove(); } }); @@ -29,7 +29,7 @@ function replaceWithBundled(html) { hexo.extend.generator.register('bundle.js', function (locals) { const folder = path.join(root, 'js'); const concated = fs.readdirSync(path.join(root, 'js')) - .filter(filename => filename.endsWith('.js')) + .filter(filename => filename.endsWith('.js') && !filename.includes('animation')) .map(filename => fs.readFileSync(path.join(folder, filename))) .join('\n'); const result = UglifyJS.minify(concated); diff --git a/themes/icarus b/themes/icarus index 8c356af..a785bd3 160000 --- a/themes/icarus +++ b/themes/icarus @@ -1 +1 @@ -Subproject commit 8c356afb62f9253b1ec5267e101357ea23688972 +Subproject commit a785bd3b847bb1fc939a3e264dcfa98088b73871