MkDocs plugin that minifies HTML, JS, and CSS output using the blisteringly fast minify-html Rust-based minifier. Current version 0.3.10, released June 2024. Active development with semver.
pip install mkdocs-minify-html-pluginVerified import paths — ran on the pinned version, not inferred.
Enable the plugin in your MkDocs configuration. The plugin automatically minifies all HTML, JS, and CSS output during build.
Update your mkdocs.yml: replace 'js: true' with 'minify_js: true', same for css.
Order: start with 'search', then add 'minify-html'.
Migrate 'htmlmin_opts.remove_comments' to 'remove_comments: true' (once 0.4.0 lands). For now, both work.
Add 'minify_inline_css: true' and 'minify_inline_js: true' to your plugin config.