summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/resources/Concat.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/resources/Concat.md')
-rw-r--r--docs/content/en/functions/resources/Concat.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/en/functions/resources/Concat.md b/docs/content/en/functions/resources/Concat.md
new file mode 100644
index 000000000..809ee83d0
--- /dev/null
+++ b/docs/content/en/functions/resources/Concat.md
@@ -0,0 +1,26 @@
+---
+title: resources.Concat
+description: Returns a concatenated slice of resources.
+categories: []
+keywords: []
+action:
+ aliases: []
+ related: []
+ returnType: resource.Resource
+ signatures: ['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.
+
+[media type]: https://en.wikipedia.org/wiki/Media_type
+[`publish`]: /methods/resource/publish
+[`permalink`]: /methods/resource/permalink
+[`relpermalink`]: /methods/resource/relpermalink
+
+```go-html-template
+{{ $plugins := resources.Get "js/plugins.js" }}
+{{ $global := resources.Get "js/global.js" }}
+{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
+```