# HtmlMinifier
[](https://github.com/gsmlg-dev/ex_html_minifier/actions/workflows/elixir_ci.yml)
[](https://hex.pm/packages/html_minifier)
[](https://hexdocs.pm/html_minifier/)
[](https://hex.pm/packages/html_minifier)
[](https://hex.pm/packages/html_minifier)
## Installation
The package can be installed
by adding `html_minifier` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:html_minifier, "~> 0.1.3"}
]
end
```
## Examples
```elixir
iex> HtmlMinifier.minify("<div> A </div>", %HtmlMinfier{})
"<div> A </div>"
```
## Config
```elixir
%HtmlMinifier{
keep_closing_tags: boolean(),
keep_html_and_head_opening_tags: boolean(),
keep_spaces_between_attributes: boolean(),
minify_css: boolean(),
minify_js: boolean(),
remove_bangs: boolean(),
remove_processing_instructions: boolean(),
do_not_minify_doctype: boolean(),
ensure_spec_compliant_unquoted_attribute_values: boolean(),
keep_comments: boolean(),
keep_input_type_text_attr: boolean(),
keep_ssi_comments: boolean(),
preserve_brace_template_syntax: boolean(),
preserve_chevron_percent_template_syntax: boolean()
}
```