mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit 'a3535c8486b2ce762b1a8a9c30b03985c3e02cee'
This commit is contained in:
25
docs/content/en/hugo-pipes/minification.md
Executable file
25
docs/content/en/hugo-pipes/minification.md
Executable file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: Asset minification
|
||||
description: Hugo Pipes allows the minification of any CSS, JS, JSON, HTML, SVG or XML resource.
|
||||
date: 2018-07-14
|
||||
publishdate: 2018-07-14
|
||||
lastmod: 2018-07-14
|
||||
categories: [asset management]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: "pipes"
|
||||
weight: 50
|
||||
weight: 50
|
||||
sections_weight: 50
|
||||
draft: false
|
||||
---
|
||||
|
||||
|
||||
Any resource of the aforementioned types can be minifed using `resources.Minify` which takes for argument the resource object.
|
||||
|
||||
|
||||
```go-html-template
|
||||
{{ $css := resources.Get "css/main.css" }}
|
||||
{{ $style := $css | resources.Minify }}
|
||||
```
|
Reference in New Issue
Block a user