resources.Minify
Returns a minified version of the given resource.
- Syntax
- resources.Minify RESOURCE
- Returns
- resource.Resource
- Alias
- minify
Use this method with global resources, page resources, or remote resources.
{{ $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.
Last updated:
September 11, 2026
:
content: Comply with function/method description guidance in style guide (76fa3fc9e)
Improve this page