Skip to content

This is an HTML minifier for GitBook plugin. Run HTML minify after the build.

License

Notifications You must be signed in to change notification settings

hiroki-uchida/gitbook-plugin-html-minifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitBook HTML minify Plugin

This is an HTML minifier for GitBook plugin.

Run HTML minify after the build.

It is powered by the html-minifier.

Usage

Installation

Add the plugin to your book.json:

{
  "plugins": ["html-minifier"]
}

and run install command

$ gitbook install

Optional configuration

You can add the following configuration params to your book.json:

{
  "plugins": ["html-minifier"],
  "pluginsConfig": {
    "html-minifier": {
      "caseSensitive": true,
      "collapseBooleanAttributes": true,
      "collapseInlineTagWhitespace": true,
      "collapseWhitespace": true,
      "conservativeCollapse": true,
      "customAttrAssign": [],
      "customAttrSurround": [],
      "decodeEntities": false,
      "html5": true,
      "includeAutoGeneratedTags": true,
      "keepClosingSlash": true,
      "minifyCSS": true,
      "minifyJS": true,
      "minifyURLs": false,
      "preserveLineBreaks": false,
      "preventAttributesEscaping": false,
      "processConditionalComments": false,
      "processScripts": [],
      "quoteCharacter": null,
      "removeAttributeQuotes": false,
      "removeComments": true,
      "removeEmptyAttributes": false,
      "removeEmptyElements": true,
      "removeOptionalTags": false,
      "removeRedundantAttributes": false,
      "removeScriptTypeAttributes": false,
      "removeStyleLinkTypeAttributes": false,
      "removeTagWhitespace": true,
      "sortAttributes": true,
      "sortClassName": true,
      "trimCustomFragments": false,
      "useShortDoctype": false,
    }
  }
}

License

MIT License

About

This is an HTML minifier for GitBook plugin. Run HTML minify after the build.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published