add html minify and dynamic mapping to templates