WIP, but this is going to become my new blog CMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
699 B

package main
import (
"github.com/tdewolff/minify/v2"
mCss "github.com/tdewolff/minify/v2/css"
mHtml "github.com/tdewolff/minify/v2/html"
mJs "github.com/tdewolff/minify/v2/js"
mJson "github.com/tdewolff/minify/v2/json"
mXml "github.com/tdewolff/minify/v2/xml"
)
var minifier *minify.M
func initMinify() {
minifier = minify.New()
minifier.AddFunc(contentTypeHTML, mHtml.Minify)
minifier.AddFunc("text/css", mCss.Minify)
minifier.AddFunc("text/xml", mXml.Minify)
minifier.AddFunc("application/javascript", mJs.Minify)
minifier.AddFunc("application/rss+xml", mXml.Minify)
minifier.AddFunc("application/atom+xml", mXml.Minify)
minifier.AddFunc("application/feed+json", mJson.Minify)
}