hugo/docs/content/en/functions/resources/Concat.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

926 B

title description categories keywords action
resources.Concat Returns a concatenated slice of resources.
aliases related returnType signatures
resource.Resource
resources.Concat TARGETPATH [RESOURCE...]

The resources.Concat function returns a concatenated slice of resources, caching the result using the target path as its cache key. Each resource must have the same media type.

Hugo publishes the resource to the target path when you call its Publish, Permalink, or RelPermalink methods.

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