1.0.0 • Published 2 years ago

hexo-html-minifier-terser v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

hexo-html-minifier-terser

NPM version

Minify HTML files with html-minifier-terser.

Installation

$ npm install html-minifier-terser --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