Skip to content

Commit

Permalink
pref: migrate to minify-html-onepass (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed May 14, 2024
1 parent 4a08f18 commit d67330d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deepmodeling_sphinx/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import Any, Dict

import htmlmin
import minify_html_onepass
from cssmin import cssmin
from jinja2 import Template
from jsmin import jsmin
Expand Down Expand Up @@ -120,7 +120,7 @@ def minify_html_files(app, pagename, templatename, context, doctree):

def render(self, template, render_context):
content = old_render(template, render_context)
return htmlmin.minify(content)
return minify_html_onepass.minify(content, minify_js=True)

render.__dict__.update(old_render.__dict__)
render._deepmodeling_minified = True
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
]
dependencies = [
'sphinx',
'htmlmin',
'minify-html-onepass',
'jsmin',
'cssmin',
'jinja2',
Expand Down

0 comments on commit d67330d

Please sign in to comment.