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:
parent
6acab324db
commit
01e555172f
@ -5,7 +5,7 @@ author = {
|
|||||||
"email":"maloja@krateng.dev",
|
"email":"maloja@krateng.dev",
|
||||||
"github": "krateng"
|
"github": "krateng"
|
||||||
}
|
}
|
||||||
version = 2,8,3
|
version = 2,8,4
|
||||||
versionstr = ".".join(str(n) for n in version)
|
versionstr = ".".join(str(n) for n in version)
|
||||||
links = {
|
links = {
|
||||||
"pypi":"malojaserver",
|
"pypi":"malojaserver",
|
||||||
@ -21,7 +21,8 @@ requires = [
|
|||||||
"wand>=0.5.4",
|
"wand>=0.5.4",
|
||||||
"lesscpy>=0.13",
|
"lesscpy>=0.13",
|
||||||
"jinja2>2.11",
|
"jinja2>2.11",
|
||||||
"lru-dict>=1.1.6"
|
"lru-dict>=1.1.6",
|
||||||
|
"htmlmin>=0.1.12"
|
||||||
]
|
]
|
||||||
resources = [
|
resources = [
|
||||||
"web/*/*/*",
|
"web/*/*/*",
|
||||||
|
@ -35,6 +35,7 @@ import os
|
|||||||
import setproctitle
|
import setproctitle
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import math
|
import math
|
||||||
|
from htmlmin.decorator import htmlmin
|
||||||
# url handling
|
# url handling
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
@ -192,8 +193,6 @@ aliases = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@webserver.route("/<name:re:admin.*>")
|
@webserver.route("/<name:re:admin.*>")
|
||||||
@auth.authenticated
|
@auth.authenticated
|
||||||
def static_html_private(name):
|
def static_html_private(name):
|
||||||
@ -203,6 +202,7 @@ def static_html_private(name):
|
|||||||
def static_html_public(name):
|
def static_html_public(name):
|
||||||
return static_html(name)
|
return static_html(name)
|
||||||
|
|
||||||
|
@htmlmin
|
||||||
def static_html(name):
|
def static_html(name):
|
||||||
if name in aliases: redirect(aliases[name])
|
if name in aliases: redirect(aliases[name])
|
||||||
linkheaders = ["</style.css>; rel=preload; as=style"]
|
linkheaders = ["</style.css>; rel=preload; as=style"]
|
||||||
|
Loading…
Reference in New Issue
Block a user