1
0
Fork 0
hugo/docs/content/en/functions/resources/Minify.md

590 B

title description categories keywords action
resources.Minify Minifies the given resource.
aliases related returnType signatures
minify
functions/resources/Fingerprint
functions/css/Sass
functions/css/TailwindCSS
functions/js/Build
functions/js/Babel
resource.Resource
resources.Minify RESOURCE
{{ $css := resources.Get "css/main.css" }}
{{ $style := $css | minify }}

Any CSS, JS, JSON, HTML, SVG, or XML resource can be minified using resources.Minify which takes for argument the resource object.