hugo/docs/content/en/hugo-pipes/bundling.md
2023-10-20 09:43:56 +02:00

701 B
Executable file

title linkTitle description categories keywords menu weight signatures
Concat Concatenating assets Bundle any number of assets into one resource.
asset management
docs
parent weight
hugo-pipes 90
90
resources.Concat TARGET_PATH SLICE_RESOURCES

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