hexo-html-minifier

1.0.0 • Public • Published

hexo-html-minifier

Build Status NPM version

Minify HTML files with HTMLMinifier.

Installation

$ npm install hexo-html-minifier --save

Options

You can set options of HTMLMinifier in the main _config.yml file:

html_minifier:
  exclude: 

Default options:

html_minifier:  
  collapseBooleanAttributes: true
  collapseWhitespace: true
  # Ignore '<!-- more -->' https://hexo.io/docs/tag-plugins#Post-Excerpt 
  ignoreCustomComments: [ !!js/regexp /^\s*more/]
  removeComments: true
  removeEmptyAttributes: true
  removeScriptTypeAttributes: true
  removeStyleLinkTypeAttributes: true
  minifyJS: true
  minifyCSS: true
  • ignoreCustomComments: Array of regex'es that allow to ignore certain comments, when matched. Need to prepend !!js/regexp to support regex.

Description of the above options and other available options, see HTMLMinifier

Readme

Keywords

Package Sidebar

Install

npm i hexo-html-minifier

Weekly Downloads

203

Version

1.0.0

License

MIT

Unpacked Size

4.32 kB

Total Files

5

Last publish

Collaborators

  • abnerchou
  • curben
  • ertrzyiks
  • hexobot
  • jlhwung
  • tomap
  • tommy351
  • yoshinorin