mirror of https://github.com/curbengh/hexo-yam
1c8c24029f | ||
---|---|---|
lib | ||
.gitignore | ||
.npmignore | ||
.snyk | ||
.travis.yml | ||
README.md | ||
index.js | ||
package-lock.json | ||
package.json |
README.md
Hexo-yam
This project is based on hexo-neat
Yet Another Minifier for Hexo. Minify and compress html, js and css. Support gzip and brotli compressions.
The original package has not been updated for a while. Its outdated dependencies suffer from a minor vulnerability.
All the options are the same, so you can use this as a drop-in replacement.
Installation
$ npm install hexo-yam --save
Usage
To enable this plugin, insert the following to _config.yml
:
neat_enable: true
For further customization, see below.
Options
neat_html:
enable: true
exclude:
- enable - Enable the plugin. Defaults to
true
. - logger - Print log switch. Defaults to
true
. - exclude: Exclude files Note: For more options, see 'HTMLMinifier'
neat_css:
enable: true
exclude:
- '*.min.css'
- enable - Enable the plugin. Defaults to
true
. - logger - Print log switch. Defaults to
true
. - exclude: Exclude files
neat_js:
enable: true
mangle: true
output:
compress:
exclude:
- '*.min.js'
- enable - Enable the plugin. Defaults to
true
. - mangle: Mangle file names
- logger - Print log switch. Defaults to
true
. - output: Output options
- compress: Compress options
- exclude: Exclude files Note: For more options, see 'UglifyJS'
neat_gzip:
enable: true
- enable - Enable the plugin. Defaults to
true
. - logger - Print log switch. Defaults to
true
.
neat_brotli:
enable: true
- enable - Enable the plugin. Defaults to
true
. - logger - Print log switch. Defaults to
true
.
Credits
All credits go to the following work:
- hexo-neat by rozbo
- neat html by HTMLMinifier
- neat css by clean-css
- neat js by UglifyJS
- gzip inspired by hexo-generator-optimize