MkDocs plugin for minification using minify-html, an extremely fast and smart HTML + JS + CSS minifier.
Install:
pip install -U mkdocs-minify-html-plugin
Activate in mkdocs.yml
:
plugins:
- search
- minify_html
A description of all options is available in the minify_html docs.
The default plugin options are aimed at the best possible minification while maintaining compliance with the specification:
plugins:
- search
- minify_html:
do_not_minify_doctype: true
ensure_spec_compliant_unquoted_attribute_values: true
keep_closing_tags: false
keep_html_and_head_opening_tags: false
keep_spaces_between_attributes: true
keep_comments: false
keep_input_type_text_attr: true
keep_ssi_comments: false
preserve_brace_template_syntax: false
preserve_chevron_percent_template_syntax: false
minify_css: true
minify_js: true
remove_bangs: false
remove_processing_instructions: false