A metalsmith plugin to minify html using htmlnano
An optional features section (if there are many), or an extended description of the core plugin
NPM:
npm install @metalsmith/htmlmin
Yarn:
yarn add @metalsmith/htmlmin
Pass @metalsmith/htmlmin to metalsmith.use :
import htmlmin from '@metalsmith/htmlmin'
metalsmith.use(htmlmin()) // defaults
metalsmith.use(htmlmin({ // explicit defaults
...
}))Optional section with list or table of options, if the plugin has a lot of options
Document a first specific usage example, the title can be "Achieve x by doing y"
Document a second specific usage example, the title can be "Achieve x by doing y"
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.
To use this plugin with the Metalsmith CLI, add @metalsmith/htmlmin to the plugins key in your metalsmith.json file:
{
"plugins": [
{
"@metalsmith/htmlmin": {}
}
]
}Special thanks to ... for ...