All in one. Minifier & Optimization plugin for Hexo. Since most of the optimize plugin for HEXO have been deprecated, and HEXO has upgraded to 3.XX, so I decide to implement this plugin.
$ npm install hexo-all-minifier --save
For Mac User, maybe you need to install somthing more
$ brew install libtool automake autoconf nasm
Integrate all the official minifier plugins of HEXO and a imagemin plugin:
- hexo-html-minifier, which is based on HTMLMinifier
- hexo-clean-css, which is based on clean-css
- hexo-uglify, which is based on UglifyJS
- hexo-imagemin, which is based on imagemin
Thanks for their works.
all_minifier:
enable: true
enable_in_debug: false
- enable - Enable the plugin. Defaults to
true
. - enable_in_debug - Enable the plugin in debug mode. Defaults to
false
.
html_minifier:
enable: true
ignore_error: false
exclude:
- enable - Enable the plugin. Defaults to
true
. - ignore_error - Ignore the error occurred on parsing html
- exclude: Exclude files
css_minifier:
enable: true
exclude:
- '*.min.css'
- enable - Enable the plugin. Defaults to
true
. - exclude: Exclude files
js_minifier:
enable: true
mangle: true
output:
compress:
exclude:
- '*.min.js'
- enable - Enable the plugin. Defaults to
true
. - mangle: Mangle file names
- output: Output options
- compress: Compress options
- exclude: Exclude files
image_minifier:
enable: true
interlaced: false
multipass: false
optimizationLevel: 2
pngquant: false
progressive: false
- enable - Enable the plugin. Defaults to
true
. - interlaced - Interlace gif for progressive rendering. Defaults to
false
. - multipass - Optimize svg multiple times until it’s fully optimized. Defaults to
false
. - optimizationLevel - Select an optimization level between 0 and 7. Defaults to
2
. - pngquant - Enable imagemin-pngquant plugin. Defaults to
false
. - progressive - Lossless conversion to progressive. Defaults to
false
. - exclude - Exclude specific types of image files, the input value could be
gif
,jpg
,png
, orsvg
. Default to null.
To be continued