mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 12:12:37 +00:00
3213e00f25
Markdown formatting fixes, typo fixed, broken links removed, https relevant links. Remove unused lastmod dates from edited markdown pages. Remove link to mmark GitHub repo (as its deprecated from Hugo).
797 B
797 B
title, description, date, categories, menu, keywords, signature, workson, hugoversion, relatedfuncs, aliases
| title | description | date | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | aliases | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| append | `append` appends one or more values to a slice and returns the resulting slice. | 2018-09-14 |
|
|
|
|
0.49 |
|
An example appending single values:
{{ $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:
{{ $s := slice "a" "b" "c" }}
{{ $s = $s | append (slice "d" "e") }}
The append function works for all types, including Pages.