{"id":15289228,"url":"https://github.com/illvart/gatsby-plugin-minify-html","last_synced_at":"2025-09-07T10:34:04.784Z","repository":{"id":45191667,"uuid":"238803237","full_name":"illvart/gatsby-plugin-minify-html","owner":"illvart","description":":rocket: A Gatsby plugin for minify HTML files.","archived":false,"fork":false,"pushed_at":"2023-04-18T00:24:58.000Z","size":88,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T22:19:06.517Z","etag":null,"topics":["es6","gatsby","gatsby-plugin","gatsbyjs","html","html-minifier","minify","minify-html","minify-html-plugin","optimize","terser"],"latest_commit_sha":null,"homepage":"https://npm.im/gatsby-plugin-minify-html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illvart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["illvart"],"custom":["https://linktr.ee/illvart"]}},"created_at":"2020-02-06T23:07:59.000Z","updated_at":"2023-05-12T16:57:41.000Z","dependencies_parsed_at":"2024-06-19T01:59:11.318Z","dependency_job_id":null,"html_url":"https://github.com/illvart/gatsby-plugin-minify-html","commit_stats":{"total_commits":17,"total_committers":5,"mean_commits":3.4,"dds":0.5882352941176471,"last_synced_commit":"f7723e0f3917d8b1d0033517925e64aaf30e2ea2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/illvart/gatsby-plugin-minify-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illvart%2Fgatsby-plugin-minify-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illvart%2Fgatsby-plugin-minify-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illvart%2Fgatsby-plugin-minify-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illvart%2Fgatsby-plugin-minify-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illvart","download_url":"https://codeload.github.com/illvart/gatsby-plugin-minify-html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illvart%2Fgatsby-plugin-minify-html/sbom","scorecard":{"id":484367,"data":{"date":"2025-08-11","repo":{"name":"github.com/illvart/gatsby-plugin-minify-html","commit":"f7723e0f3917d8b1d0033517925e64aaf30e2ea2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 2/17 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:25:53.515Z","repository_id":45191667,"created_at":"2025-08-19T17:25:53.515Z","updated_at":"2025-08-19T17:25:53.515Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026691,"owners_count":25209739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es6","gatsby","gatsby-plugin","gatsbyjs","html","html-minifier","minify","minify-html","minify-html-plugin","optimize","terser"],"created_at":"2024-09-30T15:59:56.053Z","updated_at":"2025-09-07T10:34:04.754Z","avatar_url":"https://github.com/illvart.png","language":"JavaScript","funding_links":["https://github.com/sponsors/illvart","https://linktr.ee/illvart"],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-minify-html\n\n[![Travis](https://img.shields.io/travis/com/illvart/gatsby-plugin-minify-html?branch=master)](https://travis-ci.com/illvart/gatsby-plugin-minify-html)\n[![NPM version](https://img.shields.io/npm/v/gatsby-plugin-minify-html)](https://www.npmjs.org/package/gatsby-plugin-minify-html)\n[![Downloads](https://img.shields.io/npm/dt/gatsby-plugin-minify-html)](https://www.npmjs.com/package/gatsby-plugin-minify-html)\n[![Issues](https://img.shields.io/github/issues-raw/illvart/gatsby-plugin-minify-html)](https://github.com/illvart/gatsby-plugin-minify-html)\n\n\u003e A Gatsby plugin for **minify HTML** files.\n\nWith this plugin, you can minify each HTML files (`.html`) at `public` directory.\n\n_NOTE: This plugin only generates output when run in `production` mode! To test your minify HTML, run: `gatsby build \u0026\u0026 gatsby serve`._\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Options](#options)\n    - [Example](#example)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nInstall with yarn:\n\n```sh\nyarn add gatsby-plugin-minify-html\n```\n\nOr install with npm:\n\n```sh\nnpm install --save gatsby-plugin-minify-html\n```\n\n## Usage\n\nAfter installing `gatsby-plugin-minify-html` you can add it to the `plugins` array in your `gatsby-config.js` file:\n\n```js\nmodule.exports = {\n  plugins: ['gatsby-plugin-minify-html']\n};\n```\n\nNote: if you are using `gatsby-plugin-brotli`, `gatsby-plugin-zopfli`, or other plugins look like used the **Gatsby Node APIs** [`onPostBuild`](https://www.gatsbyjs.org/docs/node-apis/#onPostBuild) make sure that it’s listed after this\nplugin:\n\n```js\n// good\nmodule.exports = {\n  plugins: [\n    'gatsby-plugin-minify-html',\n    'gatsby-plugin-brotli'\n  ]\n};\n\n// bad\nmodule.exports = {\n  plugins: [\n    'gatsby-plugin-brotli', // should be placed after 'gatsby-plugin-minify-html'\n    'gatsby-plugin-minify-html'\n  ]\n};\n```\n\n### Options\n\nThis plugin uses [`html-minifier-terser`](https://github.com/terser/html-minifier-terser), to use `html-minifier-terser` options put the options at `config: { }`.\n\nYou can see the options of `html-minifier-terser` are enabled default by this plugin in the [minify-html-plugin.js](https://github.com/illvart/gatsby-plugin-minify-html/blob/master/src/minify-html-plugin.js#L10):\n\n|              Name               |   Type    | Default |                                             Description                                              |\n| :-----------------------------: | :-------: | :-----: | :--------------------------------------------------------------------------------------------------: |\n|      `collapseWhitespace`       | `Boolean` | `true`  |                Collapse white space that contributes to text nodes in a document tree                |\n|           `minifyCSS`           | `Boolean` | `true`  |                          Minify CSS in style elements and style attributes                           |\n|           `minifyJS`            | `Boolean` | `true`  |                      Minify JavaScript in script elements and event attributes                       |\n|        `removeComments`         | `Boolean` | `true`  |                                         Strip HTML comments                                          |\n|  `removeScriptTypeAttributes`   | `Boolean` | `true`  |  Remove `type=\"text/javascript\"` from `script` tags. Other `type` attribute values are left intact   |\n| `removeStyleLinkTypeAttributes` | `Boolean` | `true`  | Remove `type=\"text/css\"` from `style` and `link` tags. Other `type` attribute values are left intact |\n\nSee all options `html-minifier-terser` at [Options Quick Reference](https://github.com/terser/html-minifier-terser#options-quick-reference).\n\n#### Example\n\n`gatsby-config.js`\n\n```js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-minify-html',\n      options: {\n        debug: true, // debug optional, default false\n        config: {\n          // Enabled default by this plugin\n          collapseWhitespace: false,\n          minifyCSS: false,\n          minifyJS: false,\n          removeComments: false,\n          removeScriptTypeAttributes: false,\n          removeStyleLinkTypeAttributes: false,\n          // Disabled default by html-minifier-terser\n          sortAttributes: true,\n          useShortDoctype: true\n        }\n      }\n    }\n  ]\n};\n```\n\nWhen option `debug: true` you can see a generate logs, example logs:\n\n```sh\nMinify HTML files at public directory, total HTML files 7:\npublic/404/index.html \u003e reduced 0.20%.\npublic/index.html \u003e reduced 0.19%.\n...\n```\n\n## Contributing\n\nIf you would like to help out with some code, check the [details](https://github.com/illvart/gatsby-plugin-minify-html/blob/master/docs/CONTRIBUTING.md).\n\n## License\n\nLicensed under [MIT](https://github.com/illvart/gatsby-plugin-minify-html/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillvart%2Fgatsby-plugin-minify-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillvart%2Fgatsby-plugin-minify-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillvart%2Fgatsby-plugin-minify-html/lists"}