Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nsisodiya/gatsby-plugin-html-minifier

A Gatsby plugin to easily minify HTML file
https://github.com/nsisodiya/gatsby-plugin-html-minifier

Last synced: about 1 month ago
JSON representation

A Gatsby plugin to easily minify HTML file

Awesome Lists containing this project

README

        

# gatsby-plugin-html-minifier

A Gatsby plugin to easily minify HTML file.

## Installation

With npm:

```bash
npm install --save gatsby-plugin-html-minifier html-minifier
```

Or with Yarn:

```bash
yarn add gatsby-plugin-html-minifier html-minifier
```

## Usage

In your `gatsby-config.js` file, load in the plugin along with an object of any `` attributes you want to add. Example:

```javascript
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-html-minifier',
options: {
caseSensitive: false,
collapseBooleanAttributes: false,
useShortDoctype: false
}
}
]
};
```

## Options

See all options at https://github.com/kangax/html-minifier