hugo/content/en/hugo-pipes/minification.md
Bjørn Erik Pedersen a3535c8486 Squashed 'docs/' changes from cfe89ecbc..a4fa0d1d6
a4fa0d1d6 Typos and grammatical changes
513884600 Add hugo pipes documentation

git-subtree-dir: docs
git-subtree-split: a4fa0d1d641b2b3e27a91ae8b1a0a29be3c42ddf
2018-07-19 09:18:11 +02:00

25 lines
No EOL
566 B
Markdown
Executable file

---
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 }}
```