mkdocs-minify-html-plugin 0.3.6__cp313-cp313-win_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,20 @@
1
+ def minify(
2
+ code: str,
3
+ /,
4
+ *,
5
+ allow_noncompliant_unquoted_attribute_values: bool,
6
+ allow_optimal_entities: bool,
7
+ allow_removing_spaces_between_attributes: bool,
8
+ keep_closing_tags: bool,
9
+ keep_comments: bool,
10
+ keep_html_and_head_opening_tags: bool,
11
+ keep_input_type_text_attr: bool,
12
+ keep_ssi_comments: bool,
13
+ minify_css: bool,
14
+ minify_doctype: bool,
15
+ minify_js: bool,
16
+ preserve_brace_template_syntax: bool,
17
+ preserve_chevron_percent_template_syntax: bool,
18
+ remove_bangs: bool,
19
+ remove_processing_instructions: bool,
20
+ ) -> str: ...
@@ -0,0 +1,51 @@
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from typing import Optional
5
+
6
+ from mkdocs.config import config_options as c
7
+ from mkdocs.config.base import Config
8
+ from mkdocs.config.defaults import MkDocsConfig
9
+ from mkdocs.plugins import BasePlugin
10
+ from mkdocs.structure.pages import Page
11
+
12
+ from mkdocs_minify_html_plugin._minify_html import minify
13
+
14
+ if sys.version_info >= (3, 12):
15
+ from typing import override
16
+ else:
17
+ from typing_extensions import override
18
+
19
+
20
+ class MinifyHtmlConfig(Config):
21
+ allow_noncompliant_unquoted_attribute_values = c.Type(bool, default=False)
22
+ allow_optimal_entities = c.Type(bool, default=False)
23
+ allow_removing_spaces_between_attributes = c.Type(bool, default=False)
24
+ keep_closing_tags = c.Type(bool, default=False)
25
+ keep_comments = c.Type(bool, default=False)
26
+ keep_html_and_head_opening_tags = c.Type(bool, default=False)
27
+ keep_input_type_text_attr = c.Type(bool, default=True)
28
+ keep_ssi_comments = c.Type(bool, default=False)
29
+ minify_css = c.Type(bool, default=True)
30
+ minify_doctype = c.Type(bool, default=False)
31
+ minify_js = c.Type(bool, default=True)
32
+ preserve_brace_template_syntax = c.Type(bool, default=False)
33
+ preserve_chevron_percent_template_syntax = c.Type(bool, default=False)
34
+ remove_bangs = c.Type(bool, default=False)
35
+ remove_processing_instructions = c.Type(bool, default=False)
36
+
37
+
38
+ class MinifyHtmlPlugin(BasePlugin[MinifyHtmlConfig]):
39
+ @override
40
+ def on_post_page(
41
+ self, output: str, *, page: Page, config: MkDocsConfig
42
+ ) -> Optional[str]:
43
+ return minify(output, **self.config)
44
+
45
+ @override
46
+ def on_post_template(
47
+ self, output_content: str, *, template_name: str, config: MkDocsConfig
48
+ ) -> Optional[str]:
49
+ if template_name.endswith(".html"):
50
+ return minify(output_content, **self.config)
51
+ return output_content
File without changes
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: mkdocs-minify-html-plugin
3
+ Version: 0.3.6
4
+ Classifier: Framework :: MkDocs
5
+ Classifier: Natural Language :: English
6
+ Classifier: Operating System :: MacOS
7
+ Classifier: Operating System :: Microsoft :: Windows
8
+ Classifier: Operating System :: POSIX :: Linux
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
19
+ Classifier: Programming Language :: Rust
20
+ Classifier: Typing :: Typed
21
+ Requires-Dist: mkdocs>=1.4
22
+ Requires-Dist: typing-extensions>=4.4 ; python_full_version < '3.12'
23
+ License-File: LICENSE
24
+ Summary: MkDocs plugin for minification using minify-html, an extremely fast and smart HTML + JS + CSS minifier
25
+ Author-email: monosans <hsyqixco@protonmail.com>
26
+ Requires-Python: >=3.9
27
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
28
+ Project-URL: repository, https://github.com/monosans/mkdocs-minify-html-plugin
29
+
30
+ # mkdocs-minify-html-plugin
31
+
32
+ [![CI](https://github.com/monosans/mkdocs-minify-html-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/monosans/mkdocs-minify-html-plugin/actions/workflows/ci.yml)
33
+ [![Downloads](https://static.pepy.tech/badge/mkdocs-minify-html-plugin)](https://pepy.tech/project/mkdocs-minify-html-plugin)
34
+
35
+ MkDocs plugin for minification using [minify-html](https://github.com/wilsonzlin/minify-html), an extremely fast and smart HTML + JS + CSS minifier.
36
+
37
+ ## Usage
38
+
39
+ Install:
40
+
41
+ ```bash
42
+ pip install -U mkdocs-minify-html-plugin
43
+ ```
44
+
45
+ Activate in `mkdocs.yml`:
46
+
47
+ ```yaml
48
+ plugins:
49
+ - search
50
+ - minify_html
51
+ ```
52
+
53
+ ## Options
54
+
55
+ A description of all options is available in the [minify_html docs](https://docs.rs/minify-html/0.16.4/minify_html/struct.Cfg.html#fields).
56
+
57
+ The default plugin options are aimed at the best possible minification while maintaining compliance with the specification:
58
+
59
+ ```yaml
60
+ plugins:
61
+ - search
62
+ - minify_html:
63
+ allow_noncompliant_unquoted_attribute_values: false
64
+ allow_optimal_entities: false
65
+ allow_removing_spaces_between_attributes: false
66
+ keep_closing_tags: false
67
+ keep_comments: false
68
+ keep_html_and_head_opening_tags: false
69
+ keep_input_type_text_attr: true
70
+ keep_ssi_comments: false
71
+ minify_css: true
72
+ minify_doctype: false
73
+ minify_js: true
74
+ preserve_brace_template_syntax: false
75
+ preserve_chevron_percent_template_syntax: false
76
+ remove_bangs: false
77
+ remove_processing_instructions: false
78
+ ```
79
+
80
+ ## License
81
+
82
+ [MIT](https://github.com/monosans/mkdocs-minify-html-plugin/blob/main/LICENSE)
83
+
@@ -0,0 +1,10 @@
1
+ mkdocs_minify_html_plugin-0.3.6.dist-info/METADATA,sha256=XybWOphn81C_vSRqOVsu1HIpycU-L2Mzl-js3qzfnFQ,3011
2
+ mkdocs_minify_html_plugin-0.3.6.dist-info/WHEEL,sha256=Bi2q0P5TlSZ2TKT0DV_meIlrmEQw_X7vRzNoWK-e7hA,96
3
+ mkdocs_minify_html_plugin-0.3.6.dist-info/entry_points.txt,sha256=A_wXAYr3Az8ibTw3A3u7BQYvmPDu5zNeOgAWcg2CUR4,79
4
+ mkdocs_minify_html_plugin-0.3.6.dist-info/licenses/LICENSE,sha256=CXoglBzFBps3W6thE0bcqKjrms8H1rtzq7Vf3tXrxUQ,1086
5
+ mkdocs_minify_html_plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ mkdocs_minify_html_plugin/_minify_html.cp313-win_arm64.pyd,sha256=FaYM1U8wb2WTHG5zRZ3FHGd6djEO6aAFdzU44gymBMw,15869952
7
+ mkdocs_minify_html_plugin/_minify_html.pyi,sha256=hpIaalCWhA9ReQ7Cy4yNgBOeThypb6_dccR1Bi7LR9Q,609
8
+ mkdocs_minify_html_plugin/plugin.py,sha256=haxjg1yTELVQBreiUPr09Y12sjkl2tjnOwiUyNKPunY,1919
9
+ mkdocs_minify_html_plugin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ mkdocs_minify_html_plugin-0.3.6.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-win_arm64
@@ -0,0 +1,2 @@
1
+ [mkdocs.plugins]
2
+ minify_html=mkdocs_minify_html_plugin.plugin:MinifyHtmlPlugin
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 monosans
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.