mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 15:40:15 +01:00
774 B
774 B
Minification
The mkdocs-minify-plugin will minify all *.html
files generated by
mkdocs build
in a post-processing step, stripping all unnecessary characters
to reduce the payload served to the client.
Installation
Install the plugin using pip
:
pip install mkdocs-minify-plugin
Usage
Add the following lines to mkdocs.yml
:
plugins:
- search
- minify:
minify_html: true
!!! warning "Remember to re-add the search
plugin"
If you have no `plugins` entry in your config file yet, you'll likely also
want to add back the `search` plugin. MkDocs enables it by default if there
is no `plugins` entry set and it will not be included if omitted.