mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
693 B
693 B
title, linktitle, description, godocref, date, publishdate, lastmod, categories, tags, signature, workson, hugoversion, relatedfuncs, deprecated, draft, aliases, toc, needsexamples
| title | linktitle | description | godocref | date | publishdate | lastmod | categories | tags | signature | workson | hugoversion | relatedfuncs | deprecated | draft | aliases | toc | needsexamples | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| slice | slice | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
false | false | false | true |
slice allows you to create an array ([]interface{}) of all arguments that you pass to this function.
One use case is the concatenation of elements in combination with the delimit function:
{{% code "slice.html" %}}
{{ delimit (slice "foo" "bar" "buzz") ", " }}
<!-- returns the string "foo, bar, buzz" -->
{{% /code %}}