mkdocs-minify-html-plugin 0.3.18__tar.gz → 0.3.19__tar.gz
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.
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/Cargo.lock +26 -26
- mkdocs_minify_html_plugin-0.3.19/Cargo.toml +101 -0
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/PKG-INFO +18 -5
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/README.md +6 -2
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/pyproject.toml +32 -6
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/python/mkdocs_minify_html_plugin/plugin.py +1 -3
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/src/lib.rs +3 -50
- mkdocs_minify_html_plugin-0.3.18/Cargo.toml +0 -30
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/LICENSE +0 -0
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/LICENSE-THIRD-PARTY +0 -0
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/python/mkdocs_minify_html_plugin/__init__.py +0 -0
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/python/mkdocs_minify_html_plugin/_minify_html.pyi +0 -0
- {mkdocs_minify_html_plugin-0.3.18 → mkdocs_minify_html_plugin-0.3.19}/python/mkdocs_minify_html_plugin/py.typed +0 -0
|
@@ -188,9 +188,9 @@ checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79"
|
|
|
188
188
|
|
|
189
189
|
[[package]]
|
|
190
190
|
name = "crc32fast"
|
|
191
|
-
version = "1.5.
|
|
191
|
+
version = "1.5.5"
|
|
192
192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
-
checksum = "
|
|
193
|
+
checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
|
|
194
194
|
dependencies = [
|
|
195
195
|
"cfg-if",
|
|
196
196
|
]
|
|
@@ -249,7 +249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
249
249
|
checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a"
|
|
250
250
|
dependencies = [
|
|
251
251
|
"quote",
|
|
252
|
-
"syn 3.0.
|
|
252
|
+
"syn 3.0.10",
|
|
253
253
|
]
|
|
254
254
|
|
|
255
255
|
[[package]]
|
|
@@ -288,7 +288,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
|
|
|
288
288
|
dependencies = [
|
|
289
289
|
"proc-macro2",
|
|
290
290
|
"quote",
|
|
291
|
-
"syn 3.0.
|
|
291
|
+
"syn 3.0.10",
|
|
292
292
|
]
|
|
293
293
|
|
|
294
294
|
[[package]]
|
|
@@ -350,9 +350,9 @@ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
|
350
350
|
|
|
351
351
|
[[package]]
|
|
352
352
|
name = "flate2"
|
|
353
|
-
version = "1.1.
|
|
353
|
+
version = "1.1.11"
|
|
354
354
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
355
|
-
checksum = "
|
|
355
|
+
checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4"
|
|
356
356
|
dependencies = [
|
|
357
357
|
"crc32fast",
|
|
358
358
|
"miniz_oxide",
|
|
@@ -568,9 +568,9 @@ dependencies = [
|
|
|
568
568
|
|
|
569
569
|
[[package]]
|
|
570
570
|
name = "itoa"
|
|
571
|
-
version = "1.0.
|
|
571
|
+
version = "1.0.19"
|
|
572
572
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
573
|
-
checksum = "
|
|
573
|
+
checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
|
574
574
|
|
|
575
575
|
[[package]]
|
|
576
576
|
name = "js-sys"
|
|
@@ -723,7 +723,7 @@ dependencies = [
|
|
|
723
723
|
|
|
724
724
|
[[package]]
|
|
725
725
|
name = "mkdocs-minify-html-plugin"
|
|
726
|
-
version = "0.3.
|
|
726
|
+
version = "0.3.19"
|
|
727
727
|
dependencies = [
|
|
728
728
|
"minify-html",
|
|
729
729
|
"pyo3",
|
|
@@ -1147,9 +1147,9 @@ dependencies = [
|
|
|
1147
1147
|
|
|
1148
1148
|
[[package]]
|
|
1149
1149
|
name = "parcel_sourcemap"
|
|
1150
|
-
version = "2.1.
|
|
1150
|
+
version = "2.1.2"
|
|
1151
1151
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1152
|
-
checksum = "
|
|
1152
|
+
checksum = "8903065c1579cf9f38ee9caca6336d43d990f2a0ebc8e27045c6130fb29a00fb"
|
|
1153
1153
|
dependencies = [
|
|
1154
1154
|
"base64-simd 0.7.0",
|
|
1155
1155
|
"data-url",
|
|
@@ -1383,7 +1383,7 @@ dependencies = [
|
|
|
1383
1383
|
"proc-macro2",
|
|
1384
1384
|
"pyo3-macros-backend",
|
|
1385
1385
|
"quote",
|
|
1386
|
-
"syn 3.0.
|
|
1386
|
+
"syn 3.0.10",
|
|
1387
1387
|
]
|
|
1388
1388
|
|
|
1389
1389
|
[[package]]
|
|
@@ -1395,7 +1395,7 @@ dependencies = [
|
|
|
1395
1395
|
"heck",
|
|
1396
1396
|
"proc-macro2",
|
|
1397
1397
|
"quote",
|
|
1398
|
-
"syn 3.0.
|
|
1398
|
+
"syn 3.0.10",
|
|
1399
1399
|
]
|
|
1400
1400
|
|
|
1401
1401
|
[[package]]
|
|
@@ -1579,7 +1579,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
1579
1579
|
dependencies = [
|
|
1580
1580
|
"proc-macro2",
|
|
1581
1581
|
"quote",
|
|
1582
|
-
"syn 3.0.
|
|
1582
|
+
"syn 3.0.10",
|
|
1583
1583
|
]
|
|
1584
1584
|
|
|
1585
1585
|
[[package]]
|
|
@@ -1630,9 +1630,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
1630
1630
|
|
|
1631
1631
|
[[package]]
|
|
1632
1632
|
name = "smallvec"
|
|
1633
|
-
version = "1.16.
|
|
1633
|
+
version = "1.16.5"
|
|
1634
1634
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1635
|
-
checksum = "
|
|
1635
|
+
checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46"
|
|
1636
1636
|
|
|
1637
1637
|
[[package]]
|
|
1638
1638
|
name = "smawk"
|
|
@@ -1676,9 +1676,9 @@ dependencies = [
|
|
|
1676
1676
|
|
|
1677
1677
|
[[package]]
|
|
1678
1678
|
name = "syn"
|
|
1679
|
-
version = "3.0.
|
|
1679
|
+
version = "3.0.10"
|
|
1680
1680
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1681
|
-
checksum = "
|
|
1681
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
1682
1682
|
dependencies = [
|
|
1683
1683
|
"proc-macro2",
|
|
1684
1684
|
"quote",
|
|
@@ -1693,7 +1693,7 @@ checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02"
|
|
|
1693
1693
|
dependencies = [
|
|
1694
1694
|
"proc-macro2",
|
|
1695
1695
|
"quote",
|
|
1696
|
-
"syn 3.0.
|
|
1696
|
+
"syn 3.0.10",
|
|
1697
1697
|
]
|
|
1698
1698
|
|
|
1699
1699
|
[[package]]
|
|
@@ -1736,7 +1736,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
|
1736
1736
|
dependencies = [
|
|
1737
1737
|
"proc-macro2",
|
|
1738
1738
|
"quote",
|
|
1739
|
-
"syn 3.0.
|
|
1739
|
+
"syn 3.0.10",
|
|
1740
1740
|
]
|
|
1741
1741
|
|
|
1742
1742
|
[[package]]
|
|
@@ -1797,9 +1797,9 @@ checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6"
|
|
|
1797
1797
|
|
|
1798
1798
|
[[package]]
|
|
1799
1799
|
name = "uuid"
|
|
1800
|
-
version = "1.29.
|
|
1800
|
+
version = "1.29.2"
|
|
1801
1801
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1802
|
-
checksum = "
|
|
1802
|
+
checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c"
|
|
1803
1803
|
dependencies = [
|
|
1804
1804
|
"js-sys",
|
|
1805
1805
|
"wasm-bindgen",
|
|
@@ -1869,7 +1869,7 @@ dependencies = [
|
|
|
1869
1869
|
"bumpalo",
|
|
1870
1870
|
"proc-macro2",
|
|
1871
1871
|
"quote",
|
|
1872
|
-
"syn 3.0.
|
|
1872
|
+
"syn 3.0.10",
|
|
1873
1873
|
"wasm-bindgen-shared",
|
|
1874
1874
|
]
|
|
1875
1875
|
|
|
@@ -1928,7 +1928,7 @@ checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
|
|
|
1928
1928
|
dependencies = [
|
|
1929
1929
|
"proc-macro2",
|
|
1930
1930
|
"quote",
|
|
1931
|
-
"syn 3.0.
|
|
1931
|
+
"syn 3.0.10",
|
|
1932
1932
|
"synstructure",
|
|
1933
1933
|
]
|
|
1934
1934
|
|
|
@@ -1969,7 +1969,7 @@ checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a"
|
|
|
1969
1969
|
dependencies = [
|
|
1970
1970
|
"proc-macro2",
|
|
1971
1971
|
"quote",
|
|
1972
|
-
"syn 3.0.
|
|
1972
|
+
"syn 3.0.10",
|
|
1973
1973
|
"synstructure",
|
|
1974
1974
|
]
|
|
1975
1975
|
|
|
@@ -2005,7 +2005,7 @@ checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a"
|
|
|
2005
2005
|
dependencies = [
|
|
2006
2006
|
"proc-macro2",
|
|
2007
2007
|
"quote",
|
|
2008
|
-
"syn 3.0.
|
|
2008
|
+
"syn 3.0.10",
|
|
2009
2009
|
]
|
|
2010
2010
|
|
|
2011
2011
|
[[package]]
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "mkdocs-minify-html-plugin"
|
|
3
|
+
version = "0.3.19"
|
|
4
|
+
edition = "2024"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
include = [
|
|
7
|
+
"/Cargo.lock",
|
|
8
|
+
"/Cargo.toml",
|
|
9
|
+
"/LICENSE",
|
|
10
|
+
"/LICENSE-THIRD-PARTY",
|
|
11
|
+
"/README.md",
|
|
12
|
+
"/pyproject.toml",
|
|
13
|
+
"/python",
|
|
14
|
+
"/src",
|
|
15
|
+
]
|
|
16
|
+
publish = false
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
|
|
19
|
+
[lib]
|
|
20
|
+
crate-type = ["cdylib"]
|
|
21
|
+
name = "_minify_html"
|
|
22
|
+
|
|
23
|
+
[dependencies]
|
|
24
|
+
minify-html = "=0.18.1"
|
|
25
|
+
pyo3 = "=0.30.1"
|
|
26
|
+
|
|
27
|
+
[lints.clippy]
|
|
28
|
+
absolute_paths = "allow"
|
|
29
|
+
all = { level = "deny", priority = -1 }
|
|
30
|
+
allow_attributes_without_reason = "allow"
|
|
31
|
+
arbitrary_source_item_ordering = "allow"
|
|
32
|
+
as_conversions = "allow"
|
|
33
|
+
blanket_clippy_restriction_lints = "allow"
|
|
34
|
+
cargo = { level = "deny", priority = -1 }
|
|
35
|
+
cast_precision_loss = "allow"
|
|
36
|
+
cognitive_complexity = "allow"
|
|
37
|
+
else_if_without_else = "allow"
|
|
38
|
+
float_arithmetic = "allow"
|
|
39
|
+
implicit_return = "allow"
|
|
40
|
+
integer_division_remainder_used = "allow"
|
|
41
|
+
iter_over_hash_type = "allow"
|
|
42
|
+
min_ident_chars = "allow"
|
|
43
|
+
missing_docs_in_private_items = "allow"
|
|
44
|
+
mod_module_files = "allow"
|
|
45
|
+
multiple_crate_versions = "allow"
|
|
46
|
+
nursery = { level = "deny", priority = -1 }
|
|
47
|
+
pattern_type_mismatch = "allow"
|
|
48
|
+
pedantic = { level = "deny", priority = -1 }
|
|
49
|
+
question_mark_used = "allow"
|
|
50
|
+
restriction = { level = "deny", priority = -1 }
|
|
51
|
+
separated_literal_suffix = "allow"
|
|
52
|
+
shadow_reuse = "allow"
|
|
53
|
+
shadow_unrelated = "allow"
|
|
54
|
+
single_call_fn = "allow"
|
|
55
|
+
single_char_lifetime_names = "allow"
|
|
56
|
+
std_instead_of_alloc = "allow"
|
|
57
|
+
std_instead_of_core = "allow"
|
|
58
|
+
too_many_lines = "allow"
|
|
59
|
+
unwrap_used = "allow"
|
|
60
|
+
|
|
61
|
+
[lints.rust]
|
|
62
|
+
ambiguous_negative_literals = "deny"
|
|
63
|
+
deprecated_in_future = "deny"
|
|
64
|
+
deprecated_safe = { level = "deny", priority = -1 }
|
|
65
|
+
deref_into_dyn_supertrait = "deny"
|
|
66
|
+
ffi_unwind_calls = "deny"
|
|
67
|
+
future_incompatible = { level = "deny", priority = -1 }
|
|
68
|
+
impl_trait_redundant_captures = "deny"
|
|
69
|
+
keyword_idents = { level = "deny", priority = -1 }
|
|
70
|
+
let_underscore = { level = "deny", priority = -1 }
|
|
71
|
+
macro_use_extern_crate = "deny"
|
|
72
|
+
meta_variable_misuse = "deny"
|
|
73
|
+
missing_copy_implementations = "deny"
|
|
74
|
+
missing_docs = "deny"
|
|
75
|
+
non_ascii_idents = "deny"
|
|
76
|
+
nonstandard_style = { level = "deny", priority = -1 }
|
|
77
|
+
redundant_imports = "deny"
|
|
78
|
+
redundant_lifetimes = "deny"
|
|
79
|
+
refining_impl_trait = { level = "deny", priority = -1 }
|
|
80
|
+
rust_2018_compatibility = { level = "deny", priority = -1 }
|
|
81
|
+
rust_2018_idioms = { level = "deny", priority = -1 }
|
|
82
|
+
rust_2021_compatibility = { level = "deny", priority = -1 }
|
|
83
|
+
rust_2024_compatibility = { level = "deny", priority = -1 }
|
|
84
|
+
single_use_lifetimes = "deny"
|
|
85
|
+
trivial_casts = "deny"
|
|
86
|
+
trivial_numeric_casts = "deny"
|
|
87
|
+
unit_bindings = "deny"
|
|
88
|
+
unsafe_code = "deny"
|
|
89
|
+
unstable_features = "deny"
|
|
90
|
+
unused = { level = "deny", priority = -1 }
|
|
91
|
+
unused_crate_dependencies = "deny"
|
|
92
|
+
unused_import_braces = "deny"
|
|
93
|
+
unused_lifetimes = "deny"
|
|
94
|
+
unused_qualifications = "deny"
|
|
95
|
+
variant_size_differences = "deny"
|
|
96
|
+
warnings = "deny"
|
|
97
|
+
|
|
98
|
+
[profile.release]
|
|
99
|
+
strip = true
|
|
100
|
+
lto = "fat"
|
|
101
|
+
codegen-units = 1
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs-minify-html-plugin
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.19
|
|
4
4
|
Classifier: Framework :: MkDocs
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
5
6
|
Classifier: Natural Language :: English
|
|
6
7
|
Classifier: Operating System :: MacOS
|
|
7
8
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -13,25 +14,37 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.15
|
|
17
|
+
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
|
|
16
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
19
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
18
20
|
Classifier: Programming Language :: Rust
|
|
21
|
+
Classifier: Topic :: Documentation
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
|
|
23
|
+
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
19
24
|
Classifier: Typing :: Typed
|
|
20
|
-
Requires-Dist: mkdocs>=1.4
|
|
25
|
+
Requires-Dist: mkdocs>=1.4,<=1.6.1
|
|
21
26
|
Requires-Dist: typing-extensions>=4.4 ; python_full_version < '3.12'
|
|
22
27
|
License-File: LICENSE
|
|
23
28
|
License-File: LICENSE-THIRD-PARTY
|
|
24
|
-
Summary: MkDocs plugin
|
|
29
|
+
Summary: ProperDocs and MkDocs plugin that minifies HTML pages with their inline CSS and JS, using the minify-html Rust crate
|
|
30
|
+
Keywords: css,html,html-minifier,javascript,minifier,minify,minify-html,mkdocs,mkdocs-plugin,properdocs,properdocs-plugin,rust
|
|
25
31
|
Author-email: monosans <hsyqixco@protonmail.com>
|
|
32
|
+
License-Expression: MIT
|
|
26
33
|
Requires-Python: >=3.11
|
|
27
34
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
|
+
Project-URL: changelog, https://github.com/monosans/mkdocs-minify-html-plugin/blob/main/CHANGELOG.md
|
|
36
|
+
Project-URL: issues, https://github.com/monosans/mkdocs-minify-html-plugin/issues
|
|
28
37
|
Project-URL: repository, https://github.com/monosans/mkdocs-minify-html-plugin
|
|
29
38
|
|
|
30
39
|
# <img src="https://raw.githubusercontent.com/monosans/mkdocs-minify-html-plugin/main/assets/logo.svg" alt="" width="40" align="top"> mkdocs-minify-html-plugin
|
|
31
40
|
|
|
32
41
|
[](https://pepy.tech/project/mkdocs-minify-html-plugin)
|
|
33
42
|
|
|
34
|
-
MkDocs plugin that minifies the built HTML pages, including inline CSS and JS, with [minify-html](https://github.com/wilsonzlin/minify-html).
|
|
43
|
+
[ProperDocs](https://properdocs.org/) and MkDocs plugin that minifies the built HTML pages, including inline CSS and JS, with [minify-html](https://github.com/wilsonzlin/minify-html).
|
|
44
|
+
|
|
45
|
+
## ProperDocs instead of MkDocs
|
|
46
|
+
|
|
47
|
+
MkDocs is no longer maintained, and its last release, 1.6.1, came out in August 2024. MkDocs 2.0, now in development, has no plugin system, so this plugin will not run on it. [ProperDocs](https://properdocs.org/) continues MkDocs 1.x. It reads `mkdocs.yml` and runs existing plugins without changes, this one included. This plugin still supports MkDocs 1.x as well.
|
|
35
48
|
|
|
36
49
|
## Usage
|
|
37
50
|
|
|
@@ -43,7 +56,7 @@ uv add --dev mkdocs-minify-html-plugin
|
|
|
43
56
|
pip install -U mkdocs-minify-html-plugin
|
|
44
57
|
```
|
|
45
58
|
|
|
46
|
-
Activate in `mkdocs.yml`:
|
|
59
|
+
Activate in `properdocs.yml` or `mkdocs.yml`:
|
|
47
60
|
|
|
48
61
|
```yaml
|
|
49
62
|
plugins:
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://pepy.tech/project/mkdocs-minify-html-plugin)
|
|
4
4
|
|
|
5
|
-
MkDocs plugin that minifies the built HTML pages, including inline CSS and JS, with [minify-html](https://github.com/wilsonzlin/minify-html).
|
|
5
|
+
[ProperDocs](https://properdocs.org/) and MkDocs plugin that minifies the built HTML pages, including inline CSS and JS, with [minify-html](https://github.com/wilsonzlin/minify-html).
|
|
6
|
+
|
|
7
|
+
## ProperDocs instead of MkDocs
|
|
8
|
+
|
|
9
|
+
MkDocs is no longer maintained, and its last release, 1.6.1, came out in August 2024. MkDocs 2.0, now in development, has no plugin system, so this plugin will not run on it. [ProperDocs](https://properdocs.org/) continues MkDocs 1.x. It reads `mkdocs.yml` and runs existing plugins without changes, this one included. This plugin still supports MkDocs 1.x as well.
|
|
6
10
|
|
|
7
11
|
## Usage
|
|
8
12
|
|
|
@@ -14,7 +18,7 @@ uv add --dev mkdocs-minify-html-plugin
|
|
|
14
18
|
pip install -U mkdocs-minify-html-plugin
|
|
15
19
|
```
|
|
16
20
|
|
|
17
|
-
Activate in `mkdocs.yml`:
|
|
21
|
+
Activate in `properdocs.yml` or `mkdocs.yml`:
|
|
18
22
|
|
|
19
23
|
```yaml
|
|
20
24
|
plugins:
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mkdocs-minify-html-plugin"
|
|
3
|
-
version = "0.3.
|
|
4
|
-
description = "MkDocs plugin
|
|
3
|
+
version = "0.3.19"
|
|
4
|
+
description = "ProperDocs and MkDocs plugin that minifies HTML pages with their inline CSS and JS, using the minify-html Rust crate"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
|
+
license = "MIT"
|
|
7
8
|
authors = [{ name = "monosans", email = "hsyqixco@protonmail.com" }]
|
|
9
|
+
keywords = [
|
|
10
|
+
"css",
|
|
11
|
+
"html",
|
|
12
|
+
"html-minifier",
|
|
13
|
+
"javascript",
|
|
14
|
+
"minifier",
|
|
15
|
+
"minify",
|
|
16
|
+
"minify-html",
|
|
17
|
+
"mkdocs",
|
|
18
|
+
"mkdocs-plugin",
|
|
19
|
+
"properdocs",
|
|
20
|
+
"properdocs-plugin",
|
|
21
|
+
"rust",
|
|
22
|
+
]
|
|
8
23
|
classifiers = [
|
|
9
24
|
"Framework :: MkDocs",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
10
26
|
"Natural Language :: English",
|
|
11
27
|
"Operating System :: MacOS",
|
|
12
28
|
"Operating System :: Microsoft :: Windows",
|
|
@@ -18,22 +34,32 @@ classifiers = [
|
|
|
18
34
|
"Programming Language :: Python :: 3.13",
|
|
19
35
|
"Programming Language :: Python :: 3.14",
|
|
20
36
|
"Programming Language :: Python :: 3.15",
|
|
37
|
+
"Programming Language :: Python :: Free Threading :: 3 - Stable",
|
|
21
38
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
22
39
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
23
40
|
"Programming Language :: Rust",
|
|
41
|
+
"Topic :: Documentation",
|
|
42
|
+
"Topic :: Internet :: WWW/HTTP :: Site Management",
|
|
43
|
+
"Topic :: Text Processing :: Markup :: HTML",
|
|
24
44
|
"Typing :: Typed",
|
|
25
45
|
]
|
|
46
|
+
urls.changelog = "https://github.com/monosans/mkdocs-minify-html-plugin/blob/main/CHANGELOG.md"
|
|
47
|
+
urls.issues = "https://github.com/monosans/mkdocs-minify-html-plugin/issues"
|
|
26
48
|
urls.repository = "https://github.com/monosans/mkdocs-minify-html-plugin"
|
|
27
49
|
entry-points."mkdocs.plugins".minify_html = "mkdocs_minify_html_plugin.plugin:MinifyHtmlPlugin"
|
|
28
|
-
dependencies = ["mkdocs>=1.4
|
|
50
|
+
dependencies = ["mkdocs>=1.4,<=1.6.1", "typing-extensions>=4.4; python_version<'3.12'"]
|
|
29
51
|
|
|
30
52
|
[dependency-groups]
|
|
31
53
|
dev = [
|
|
32
|
-
"mypy==2.4.
|
|
33
|
-
"ruff==0.17.
|
|
54
|
+
"mypy==2.4.1",
|
|
55
|
+
"ruff==0.17.4",
|
|
34
56
|
{ include-group = "test" },
|
|
35
57
|
]
|
|
36
|
-
test = [
|
|
58
|
+
test = [
|
|
59
|
+
"properdocs==1.6.7",
|
|
60
|
+
"properdocs-theme-mkdocs==1.6.7",
|
|
61
|
+
"pytest==9.2.0",
|
|
62
|
+
]
|
|
37
63
|
test-ci = [
|
|
38
64
|
"pytest-github-actions-annotate-failures==0.4.2",
|
|
39
65
|
{ include-group = "test" },
|
|
@@ -43,9 +43,7 @@ class MinifyHtmlPlugin(BasePlugin[MinifyHtmlConfig]):
|
|
|
43
43
|
return config
|
|
44
44
|
|
|
45
45
|
@override
|
|
46
|
-
def on_post_page(
|
|
47
|
-
self, output: str, *, page: Page, config: MkDocsConfig
|
|
48
|
-
) -> str | None:
|
|
46
|
+
def on_post_page(self, output: str, *, page: Page, config: MkDocsConfig) -> str | None:
|
|
49
47
|
return self._minifier.minify(output)
|
|
50
48
|
|
|
51
49
|
@override
|
|
@@ -1,51 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
deprecated_safe,
|
|
4
|
-
future_incompatible,
|
|
5
|
-
keyword_idents,
|
|
6
|
-
let_underscore,
|
|
7
|
-
nonstandard_style,
|
|
8
|
-
refining_impl_trait,
|
|
9
|
-
rust_2018_compatibility,
|
|
10
|
-
rust_2018_idioms,
|
|
11
|
-
rust_2021_compatibility,
|
|
12
|
-
rust_2024_compatibility,
|
|
13
|
-
unused,
|
|
14
|
-
clippy::all,
|
|
15
|
-
clippy::pedantic,
|
|
16
|
-
clippy::restriction,
|
|
17
|
-
clippy::nursery,
|
|
18
|
-
clippy::cargo
|
|
19
|
-
)]
|
|
20
|
-
#![allow(
|
|
21
|
-
clippy::absolute_paths,
|
|
22
|
-
clippy::allow_attributes_without_reason,
|
|
23
|
-
clippy::arbitrary_source_item_ordering,
|
|
24
|
-
clippy::as_conversions,
|
|
25
|
-
clippy::blanket_clippy_restriction_lints,
|
|
26
|
-
clippy::cast_precision_loss,
|
|
27
|
-
clippy::cognitive_complexity,
|
|
28
|
-
clippy::else_if_without_else,
|
|
29
|
-
clippy::float_arithmetic,
|
|
30
|
-
clippy::implicit_return,
|
|
31
|
-
clippy::integer_division_remainder_used,
|
|
32
|
-
clippy::iter_over_hash_type,
|
|
33
|
-
clippy::min_ident_chars,
|
|
34
|
-
clippy::missing_docs_in_private_items,
|
|
35
|
-
clippy::mod_module_files,
|
|
36
|
-
clippy::multiple_crate_versions,
|
|
37
|
-
clippy::pattern_type_mismatch,
|
|
38
|
-
clippy::question_mark_used,
|
|
39
|
-
clippy::separated_literal_suffix,
|
|
40
|
-
clippy::shadow_reuse,
|
|
41
|
-
clippy::shadow_unrelated,
|
|
42
|
-
clippy::single_call_fn,
|
|
43
|
-
clippy::single_char_lifetime_names,
|
|
44
|
-
clippy::std_instead_of_alloc,
|
|
45
|
-
clippy::std_instead_of_core,
|
|
46
|
-
clippy::too_many_lines,
|
|
47
|
-
clippy::unwrap_used
|
|
48
|
-
)]
|
|
1
|
+
//! The Rust side of `mkdocs-minify-html-plugin`: minifies the HTML, CSS and JS
|
|
2
|
+
//! that `MkDocs` writes, through `minify-html`.
|
|
49
3
|
|
|
50
4
|
use pyo3::prelude::*;
|
|
51
5
|
|
|
@@ -122,8 +76,7 @@ mod _minify_html {
|
|
|
122
76
|
py: Python<'py>,
|
|
123
77
|
code: &str,
|
|
124
78
|
) -> PyResult<Bound<'py, pyo3::types::PyString>> {
|
|
125
|
-
let minified =
|
|
126
|
-
py.detach(|| ::minify_html::minify(code.as_bytes(), &self.0));
|
|
79
|
+
let minified = py.detach(move || ::minify_html::minify(code.as_bytes(), &self.0));
|
|
127
80
|
pyo3::types::PyString::from_bytes(py, &minified)
|
|
128
81
|
}
|
|
129
82
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "mkdocs-minify-html-plugin"
|
|
3
|
-
version = "0.3.18"
|
|
4
|
-
edition = "2024"
|
|
5
|
-
license = "MIT"
|
|
6
|
-
include = [
|
|
7
|
-
"/Cargo.lock",
|
|
8
|
-
"/Cargo.toml",
|
|
9
|
-
"/LICENSE",
|
|
10
|
-
"/LICENSE-THIRD-PARTY",
|
|
11
|
-
"/README.md",
|
|
12
|
-
"/pyproject.toml",
|
|
13
|
-
"/python",
|
|
14
|
-
"/src",
|
|
15
|
-
]
|
|
16
|
-
publish = false
|
|
17
|
-
readme = "README.md"
|
|
18
|
-
|
|
19
|
-
[lib]
|
|
20
|
-
crate-type = ["cdylib"]
|
|
21
|
-
name = "_minify_html"
|
|
22
|
-
|
|
23
|
-
[dependencies]
|
|
24
|
-
minify-html = "=0.18.1"
|
|
25
|
-
pyo3 = "=0.30.1"
|
|
26
|
-
|
|
27
|
-
[profile.release]
|
|
28
|
-
strip = true
|
|
29
|
-
lto = "fat"
|
|
30
|
-
codegen-units = 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|