summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-14 09:55:44 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-09-14 10:12:08 +0200
commitdf50c108ba2f24936eff20b51d23f9328adb2d87 (patch)
tree840392a39c2b192c746aadd9c72075e7551ad217 /docs/content
parente27fd4c1b80b7acb43290ac50e9f140d690cf042 (diff)
docs: Add docs for append
See #5190
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/en/functions/append.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/content/en/functions/append.md b/docs/content/en/functions/append.md
new file mode 100644
index 000000000..732ffeadd
--- /dev/null
+++ b/docs/content/en/functions/append.md
@@ -0,0 +1,38 @@
+---
+title: append
+description: "`append` appends one or more values to a slice and returns the resulting slice."
+date: 2018-09-14
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [collections]
+signature: ["COLLECTION | append VALUE [VALUE]...", "COLLECTION | append COLLECTION"]
+workson: []
+hugoversion: "0.49"
+relatedfuncs: [last,first,where,slice]
+aliases: []
+---
+
+An example appending single values:
+
+```go-html-template
+{{ $s := slice "a" "b" "c" }}
+{{ $s = $s | append "d" "e" }}
+{{/* $s now contains a []string with elements "a", "b", "c", "d", and "e" */}}
+
+```
+
+The same example appending a slice to a slice:
+
+
+```go-html-template
+{{ $s := slice "a" "b" "c" }}
+{{ $s = $s | append (slice "d" "e") }}
+```
+
+The `append` function works for all types, including `Pages`.
+
+
+
+