1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added full html minification

This commit is contained in:
Krateng 2020-09-01 01:18:46 +02:00
parent 6acab324db
commit 01e555172f
2 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,8,3
version = 2,8,4
versionstr = ".".join(str(n) for n in version)
links = {
"pypi":"malojaserver",
@ -21,7 +21,8 @@ requires = [
"wand>=0.5.4",
"lesscpy>=0.13",
"jinja2>2.11",
"lru-dict>=1.1.6"
"lru-dict>=1.1.6",
"htmlmin>=0.1.12"
]
resources = [
"web/*/*/*",

View File

@ -35,6 +35,7 @@ import os
import setproctitle
import pkg_resources
import math
from htmlmin.decorator import htmlmin
# url handling
import urllib
@ -192,8 +193,6 @@ aliases = {
@webserver.route("/<name:re:admin.*>")
@auth.authenticated
def static_html_private(name):
@ -203,6 +202,7 @@ def static_html_private(name):
def static_html_public(name):
return static_html(name)
@htmlmin
def static_html(name):
if name in aliases: redirect(aliases[name])
linkheaders = ["</style.css>; rel=preload; as=style"]