{"id":18889729,"url":"https://github.com/middleman/middleman-minify-html","last_synced_at":"2025-04-07T17:09:45.407Z","repository":{"id":3057666,"uuid":"4079667","full_name":"middleman/middleman-minify-html","owner":"middleman","description":"A HTML whitespace minifier for Middleman","archived":false,"fork":false,"pushed_at":"2020-08-16T19:35:14.000Z","size":79,"stargazers_count":77,"open_issues_count":3,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-26T06:53:31.944Z","etag":null,"topics":["middleman-extension"],"latest_commit_sha":null,"homepage":"https://middlemanapp.com/","language":"Ruby","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/middleman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-19T20:07:05.000Z","updated_at":"2023-11-13T04:25:14.000Z","dependencies_parsed_at":"2022-08-31T20:31:55.279Z","dependency_job_id":null,"html_url":"https://github.com/middleman/middleman-minify-html","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middleman%2Fmiddleman-minify-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middleman%2Fmiddleman-minify-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middleman%2Fmiddleman-minify-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middleman%2Fmiddleman-minify-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/middleman","download_url":"https://codeload.github.com/middleman/middleman-minify-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"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","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":["middleman-extension"],"created_at":"2024-11-08T07:50:30.845Z","updated_at":"2025-04-07T17:09:45.377Z","avatar_url":"https://github.com/middleman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Middleman-Minify-HTML\n\n`middleman-minify-html` is an extension for the [Middleman] static site generator that minifies whitespace around HTML via [Htmlcompressor](https://github.com/paolochiodi/htmlcompressor).\n\n## Installation\n\nIf you're just getting started, install the `middleman` gem and generate a new project:\n\n```\ngem install middleman\nmiddleman init MY_PROJECT\n```\n\nIf you already have a Middleman project: Add `gem 'middleman-minify-html'` to your `Gemfile` and run `bundle install`\n\n## Configuration\n\n```ruby\nactivate :minify_html\n```\nThe various options can be passed with a block or as a hash like so:\n```ruby\nactivate :minify_html, remove_input_attributes: false\n```\nThese are the default settings, as listed in the [Htmlcompressor documentation](https://github.com/paolochiodi/htmlcompressor#usage):\n```ruby\nactivate :minify_html do |html|\n  html.ignore                     = []     # Patterns to avoid minifying\n  html.content_types              = [text/html] # Content types of resources that contain HTML\n  html.remove_multi_spaces        = true   # Remove multiple spaces\n  html.remove_comments            = true   # Remove comments\n  html.remove_intertag_spaces     = false  # Remove inter-tag spaces\n  html.remove_quotes              = true   # Remove quotes\n  html.simple_doctype             = false  # Use simple doctype\n  html.remove_script_attributes   = true   # Remove script attributes\n  html.remove_style_attributes    = true   # Remove style attributes\n  html.remove_link_attributes     = true   # Remove link attributes\n  html.remove_form_attributes     = false  # Remove form attributes\n  html.remove_input_attributes    = true   # Remove input attributes\n  html.remove_javascript_protocol = true   # Remove JS protocol\n  html.remove_http_protocol       = false  # Remove HTTP protocol\n  html.remove_https_protocol      = false  # Remove HTTPS protocol\n  html.preserve_line_breaks       = false  # Preserve line breaks\n  html.simple_boolean_attributes  = true   # Use simple boolean attributes\n  html.preserve_patterns          = nil    # Patterns to preserve\nend\n```\n\n## Build \u0026 Dependency Status\n\n[![Gem Version](https://badge.fury.io/rb/middleman-minify-html.png)][gem]\n[![Build Status](https://travis-ci.org/middleman/middleman-minify-html.png)][travis]\n[![Dependency Status](https://gemnasium.com/middleman/middleman-minify-html.png?travis)][gemnasium]\n[![Code Quality](https://codeclimate.com/github/middleman/middleman-minify-html.png)][codeclimate]\n\n## Community\n\nThe official community forum is available at: http://forum.middlemanapp.com\n\n## Bug Reports\n\nGithub Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-minify-html/issues\n\nThe best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit [Pull Requests](https://help.github.com/articles/using-pull-requests) containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.\n\n## How to Run Cucumber Tests\n\n1. Checkout Repository: `git clone https://github.com/middleman/middleman-minify-html.git`\n2. Install Bundler: `gem install bundler`\n3. Run `bundle install` inside the project root to install the gem dependencies.\n4. Run test cases: `bundle exec rake test`\n\n## Donate\n\n[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)\n\n## License\n\nCopyright (c) 2012-2014 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.\n\n[middleman]: http://middlemanapp.com\n[gem]: https://rubygems.org/gems/middleman-minify-html\n[travis]: http://travis-ci.org/middleman/middleman-minify-html\n[gemnasium]: https://gemnasium.com/middleman/middleman-minify-html\n[codeclimate]: https://codeclimate.com/github/middleman/middleman-minify-html\n[LICENSE]: https://github.com/middleman/middleman-minify-html/blob/master/LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiddleman%2Fmiddleman-minify-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiddleman%2Fmiddleman-minify-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiddleman%2Fmiddleman-minify-html/lists"}