Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/slice.md')
-rw-r--r--docs/content/en/functions/slice.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/content/en/functions/slice.md b/docs/content/en/functions/slice.md
new file mode 100644
index 000000000..0710d5e40
--- /dev/null
+++ b/docs/content/en/functions/slice.md
@@ -0,0 +1,31 @@
+---
+title: slice
+# linktitle: slice
+description: Creates a slice (array) of all passed arguments.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [slice, array, interface]
+signature: ["slice ITEM..."]
+workson: []
+hugoversion:
+relatedfuncs: []
+deprecated: false
+draft: false
+aliases: []
+toc: false
+---
+
+One use case is the concatenation of elements in combination with the [`delimit` function][]:
+
+{{< code file="slice.html" >}}
+{{ delimit (slice "foo" "bar" "buzz") ", " }}
+<!-- returns the string "foo, bar, buzz" -->
+{{< /code >}}
+
+
+[`delimit` function]: /functions/delimit/