https://github.com/monosans/mkdocs-minify-html-plugin
MkDocs plugin for minification using minify-html, an extremely fast and smart HTML + JS + CSS minifier.
https://github.com/monosans/mkdocs-minify-html-plugin
Last synced: 4 months ago
JSON representation
MkDocs plugin for minification using minify-html, an extremely fast and smart HTML + JS + CSS minifier.
- Host: GitHub
- URL: https://github.com/monosans/mkdocs-minify-html-plugin
- Owner: monosans
- License: mit
- Created: 2023-07-08T13:45:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-23T02:01:59.000Z (4 months ago)
- Last Synced: 2026-02-23T08:35:52.882Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 1.92 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mkdocs-minify-html-plugin
[](https://github.com/monosans/mkdocs-minify-html-plugin/actions/workflows/ci.yml)
[](https://pepy.tech/project/mkdocs-minify-html-plugin)
MkDocs plugin for minification using [minify-html](https://github.com/wilsonzlin/minify-html), an extremely fast and smart HTML + JS + CSS minifier.
## Usage
Install:
```bash
pip install -U mkdocs-minify-html-plugin
```
Activate in `mkdocs.yml`:
```yaml
plugins:
- search
- minify_html
```
## Options
A description of all options is available in the [minify_html docs](https://docs.rs/minify-html/0.16.4/minify_html/struct.Cfg.html#fields).
The default plugin options are aimed at the best possible minification while maintaining compliance with the specification:
```yaml
plugins:
- search
- minify_html:
allow_noncompliant_unquoted_attribute_values: false
allow_optimal_entities: false
allow_removing_spaces_between_attributes: false
keep_closing_tags: false
keep_comments: false
keep_html_and_head_opening_tags: false
keep_input_type_text_attr: true
keep_ssi_comments: false
minify_css: true
minify_doctype: false
minify_js: true
preserve_brace_template_syntax: false
preserve_chevron_percent_template_syntax: false
remove_bangs: false
remove_processing_instructions: false
```
## License
[MIT](https://github.com/monosans/mkdocs-minify-html-plugin/blob/main/LICENSE)