Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bt-rb/bridgetown-minify-html
Minify your HTML on your Bridgetown site
https://github.com/bt-rb/bridgetown-minify-html
bridgetown bridgetown-plugin rubygem
Last synced: 3 months ago
JSON representation
Minify your HTML on your Bridgetown site
- Host: GitHub
- URL: https://github.com/bt-rb/bridgetown-minify-html
- Owner: bt-rb
- License: mit
- Created: 2020-07-19T17:19:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T18:53:13.000Z (10 months ago)
- Last Synced: 2024-09-15T07:10:42.532Z (4 months ago)
- Topics: bridgetown, bridgetown-plugin, rubygem
- Language: Ruby
- Homepage:
- Size: 63.5 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Bridgetown Minify HTML
A Bridgetown plugin to Minify your outputted HTML.## Installation
Run this command to add this plugin to your site's Gemfile:
```shell
bundle add bridgetown-minify-html -g bridgetown_plugins
```## Usage
Once you've added the plugin, it'll automatically compress your outputted HTML without any additional configuration required when you run `bin/bridgetown build` or `bin/bridgetown deploy`.
### Optional configuration options
Within your `bridgetown.config.yml` file, you have the options:
```yml
minify_html:
enabled: true
remove_spaces_inside_tags: true
remove_multi_spaces: true
remove_comments: true
remove_intertag_spaces: false
remove_quotes: false
simple_doctype: false
remove_script_attributes: false
remove_style_attributes: false
remove_link_attributes: false
remove_form_attributes: false
remove_input_attributes: false
remove_javascript_protocol: false
remove_http_protocol: false
remove_https_protocol: false
preserve_line_breaks: false
simple_boolean_attributes: false
compress_js_templates: false
```## Testing
* Run `bundle exec rspec` to run the test suite
* Or run `script/cibuild` to validate with Rubocop and test with rspec together.## Contributing
1. Fork it (https://github.com/bt-rb/bridgetown-minify-html/fork)
2. Clone the fork using `git clone` to your local development machine.
3. Create your feature branch (`git checkout -b feature/my-new-feature`)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request## 💌 In Loving Memory of Mike Rogers
[Mike Rogers](https://github.com/MikeRogers0) was the creator of `bridgetown-minify-html` and participated in the project from July 2020 until his passing in November 2021. This project is maintained by [@andrewmcodes](https://github.com/andrewmcodes) in his honor. You can find Mike's obituary [here if you'd like to leave a message.](https://www.mykeeper.com/profile/MikeRogers/)