mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added documentation on minification
This commit is contained in:
parent
e24f2a3d7e
commit
bc46b87d6a
@ -1,6 +1,7 @@
|
|||||||
mkdocs-material-4.x.x (2019-06-15)
|
mkdocs-material-4.4.0 (2019-06-15)
|
||||||
|
|
||||||
* Added Slovenian translations
|
* Added Slovenian translations
|
||||||
|
* Reverted template minification in favor of mkdocs-minify-plugin
|
||||||
|
|
||||||
mkdocs-material-4.3.1 (2019-05-23)
|
mkdocs-material-4.3.1 (2019-05-23)
|
||||||
|
|
||||||
|
@ -682,6 +682,40 @@ Material theme including more information regarding installation and usage:
|
|||||||
[30]: extensions/permalinks.md
|
[30]: extensions/permalinks.md
|
||||||
[31]: extensions/pymdown.md
|
[31]: extensions/pymdown.md
|
||||||
|
|
||||||
|
## Plugins
|
||||||
|
|
||||||
|
MkDocs's plugin architecture makes it possible to add pre- or post-processing
|
||||||
|
steps that sit between the theme and your documentation. A great example of a
|
||||||
|
third-party plugin is the [mkdocs-minify-plugin][32] which strips all whitespace
|
||||||
|
from the generated documentation.
|
||||||
|
|
||||||
|
Install it with `pip`:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
pip install mkdocs-minify-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable it with the following lines in your `mkdocs.yml`:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
plugins:
|
||||||
|
- search
|
||||||
|
- minify:
|
||||||
|
minify_html: true
|
||||||
|
minify_js: true
|
||||||
|
```
|
||||||
|
|
||||||
|
The MkDocs wiki contains a [list of all available plugins][33].
|
||||||
|
|
||||||
|
!!! 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 the `search` plugin. MkDocs enables it by default if there is
|
||||||
|
no `plugins` entry set.
|
||||||
|
|
||||||
|
[32]: https://github.com/byrnereese/mkdocs-minify-plugin
|
||||||
|
[33]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins
|
||||||
|
|
||||||
## Full example
|
## Full example
|
||||||
|
|
||||||
Below is a full example configuration for a `mkdocs.yml`:
|
Below is a full example configuration for a `mkdocs.yml`:
|
||||||
|
Loading…
Reference in New Issue
Block a user