resources.Concat
Returns a concatenated slice of resources.
- Syntax
- resources.Concat TARGETPATH [RESOURCE...]
- Returns
- resource.Resource
This works with global resources, page resources, and remote resources.
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 method.
{{ $plugins := resources.Get "js/plugins.js" }}
{{ $global := resources.Get "js/global.js" }}
{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}Last updated:
October 27, 2026
:
content: Flatten and rename _common snippets (1da4dad14)
Improve this page