Files
hugo/docs/content/en/hugo-pipes/bundling.md
Bjørn Erik Pedersen 5fd1e74903 Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

754 B
Executable File

title, linkTitle, description, categories, keywords, menu, weight, action
title linkTitle description categories keywords menu weight action
Concat Concatenating assets Bundle any number of assets into one resource.
asset management
docs
parent weight
hugo-pipes 90
90
aliases returnType signatures
resource.Resource
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.

{{ $plugins := resources.Get "js/plugins.js" }}
{{ $global := resources.Get "js/global.js" }}
{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}