Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s0kil/plug_minify_html
A Plug that minifies HTML response body
https://github.com/s0kil/plug_minify_html
elixir elixir-plug floki html-minifier phoenix phoenix-framework
Last synced: about 1 month ago
JSON representation
A Plug that minifies HTML response body
- Host: GitHub
- URL: https://github.com/s0kil/plug_minify_html
- Owner: s0kil
- Created: 2020-02-23T21:50:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-23T22:34:54.000Z (almost 5 years ago)
- Last Synced: 2024-11-21T08:21:15.481Z (about 1 month ago)
- Topics: elixir, elixir-plug, floki, html-minifier, phoenix, phoenix-framework
- Language: Elixir
- Size: 5.86 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PlugMinifyHtml
**A Plug that minifies HTML response body**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `plug_minify_html` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:plug_minify_html, "~> 0.1.0"}
]
end
```## Usage
```elixir
# Simple
plug PlugMinifyHtml# Browser Pipeline
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug PlugMinifyHtml
end
```### Resurrection Of [minify_response](https://github.com/gravityblast/minify_response)