Skip to content

metalsmith/htmlmin

Repository files navigation

@metalsmith/htmlmin

A metalsmith plugin to minify html using htmlnano

metalsmith: core plugin npm: version ci: build code coverage license: MIT

Features

An optional features section (if there are many), or an extended description of the core plugin

Installation

NPM:

npm install @metalsmith/htmlmin

Yarn:

yarn add @metalsmith/htmlmin

Usage

Pass @metalsmith/htmlmin to metalsmith.use :

import htmlmin from '@metalsmith/htmlmin'

metalsmith.use(htmlmin()) // defaults
metalsmith.use(htmlmin({  // explicit defaults
  ...
}))

Options

Optional section with list or table of options, if the plugin has a lot of options

Specific usage example

Document a first specific usage example, the title can be "Achieve x by doing y"

Specific usage example

Document a second specific usage example, the title can be "Achieve x by doing y"

Debug

To enable debug logs, set the DEBUG environment variable to @metalsmith/~core_plugin~*:

metalsmith.env('DEBUG', '@metalsmith/~core_plugin~*')

Alternatively you can set DEBUG to @metalsmith/* to debug all Metalsmith core plugins.

CLI usage

To use this plugin with the Metalsmith CLI, add @metalsmith/htmlmin to the plugins key in your metalsmith.json file:

{
  "plugins": [
    {
      "@metalsmith/htmlmin": {}
    }
  ]
}

Credits (optional)

Special thanks to ... for ...

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors