mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
This commit is contained in:
@@ -9,18 +9,6 @@ menu:
|
||||
parent: hugo-pipes
|
||||
weight: 90
|
||||
weight: 90
|
||||
action:
|
||||
aliases: []
|
||||
returnType: resource.Resource
|
||||
signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
Asset files of the same MIME type can be bundled into one resource using `resources.Concat` which takes two arguments, the target path for the created resource bundle and a slice of resource objects to be concatenated.
|
||||
|
||||
```go-html-template
|
||||
{{ $plugins := resources.Get "js/plugins.js" }}
|
||||
{{ $global := resources.Get "js/global.js" }}
|
||||
{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
|
||||
```
|
||||
See the [`resources.Concat`](/functions/resources/concat/) function.
|
||||
|
Reference in New Issue
Block a user