--- id: mkdocs-minify-plugin version: "0.8.0" license: MIT license_treatment: permissive maintenance: dormant --- # mkdocs-minify-plugin — An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk License: permissive · Maintenance: dormant · Downloads: 1.1M/mo ## What it is and what it does mkdocs-minify-plugin is an MkDocs plugin that automatically minifies HTML, JavaScript, and CSS assets during the documentation build process. It delegates minification to three specialized libraries: htmlmin2 for HTML, jsmin for JavaScript, and csscompressor for CSS. The plugin integrates into MkDocs' build pipeline and can be configured to minify specific file types or all three, with options to add cache-busting hashes to file names and to customize HTML minification behavior. The plugin is useful when you want to reduce the size of generated documentation without manually running separate minification tools. It supports glob patterns for file selection and can automatically update references to minified files in your HTML output. The package is stable but dormant—last updated in early 2024—and carries no known security vulnerabilities. Use it for: - Reduce documentation site size and bandwidth for static MkDocs sites deployed to CDNs or hosting with bandwidth limits. - Add cache-busting hashes to CSS and JS files to ensure browsers fetch fresh versions after updates. - Automatically minify all HTML output from MkDocs without manual post-processing steps. - Minify custom JavaScript and CSS files included in your documentation theme or configuration. - Optimize documentation builds for low-bandwidth environments or mobile-first delivery. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Minifies HTML, JavaScript, and CSS files in MkDocs documentation builds before writing them to disk, reducing output size. Yes, if you use MkDocs and want to reduce output size without extra build steps. Install friction is low, dependencies are stable, and there are no known vulnerabilities. The dormant maintenance status is not a blocker for a simple, focused plugin, but be aware that bug fixes or feature updates are unlikely. Suitable for production documentation builds. ## Install pip install mkdocs-minify-plugin uv add mkdocs-minify-plugin poetry add mkdocs-minify-plugin ## Installing mkdocs-minify-plugin Before you install: Low friction install with a pure-Python wheel and four straightforward runtime dependencies. Maintenance is dormant—last release was 2024-01-29 and no commits since 2024-02-07—but the package is not archived and has no known vulnerabilities. License in practice: MIT license is permissive; you can use this package freely in commercial or private projects with minimal restrictions. Quickstart: pip install mkdocs-minify-plugin In mkdocs.yml: plugins: - minify: minify_html: true minify_js: true minify_css: true js_files: - path/to/file.js css_files: - path/to/file.css Requires MkDocs to be installed and an active mkdocs.yml configuration file in your project. Verify before relying: - Whether minification performance impact is measurable on large documentation sites. - Compatibility with recent MkDocs versions beyond those listed in classifiers (3.10, 3.11). ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mkdocs html minification, minify css javascript mkdocs, documentation build optimization, reduce html css js size, mkdocs plugin minify, static site size reduction, mkdocs build compression, mkdocs-plugin, build-optimization, static-site [View on SkillFed](https://skillfed.io/packages/mkdocs-minify-plugin) · [View on PyPI](https://pypi.org/project/mkdocs-minify-plugin/)