Skip to content

Commit 56af5da

Browse files
authored
switch to htmlmin; minify_html breaks the page (#6)
1 parent a49b774 commit 56af5da

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

deepmodeling_sphinx/inject.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Dict, Any
33
import os
44

5-
import minify_html
5+
import htmlmin
66
from sphinx.application import Sphinx
77
from sphinx.util.fileutil import copy_asset_file
88

@@ -65,8 +65,7 @@ def minify_html_files(app, pagename, templatename, context, doctree):
6565

6666
def render(self, template, render_context):
6767
content = old_render(template, render_context)
68-
return minify_html.minify(content, minify_css=True, minify_js=True,
69-
)
68+
return htmlmin.minify(content)
7069

7170
render._deepmodeling_minified = True
7271
app.builder.templates.render = types.MethodType(render,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
packages=['deepmodeling_sphinx'],
88
install_requires=[
99
'sphinx',
10-
'minify-html',
10+
'htmlmin',
1111
],
1212
package_data={
1313
'deepmodeling_sphinx': ['banner.html',

0 commit comments

Comments
 (0)