hexojs / hexo-html-minifier

Minify HTML files with HTMLMinifier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generated output is not minified

DrummerHead opened this issue · comments

This is the process I went through:

  1. I install the package with npm install hexo-html-minifier --save
  2. I add _config.yml details noted in readme
  3. I execute hexo clean && hexo generate
  4. I check the public folder and edit any .html file, it is not minified

Am I missing a step? I was expecting for the generated html files to be minified.

I'm using

  • hexo v3.2.0
  • node v5.5.0
  • npm v3.3.12

Thanks

You need to adjust the plugin settings in your _config.yml. Try this:

html_minifier:
  exclude: 
  removeComments: true
  collapseWhitespace: true
  removeScriptTypeAttributes: true
  removeStyleLinkTypeAttributes: true

This information should be in the README.

Done