mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
---
|
||||
title: collections.Slice
|
||||
linkTitle: slice
|
||||
description: Creates a slice (array) of all passed arguments.
|
||||
categories: [functions]
|
||||
description: Creates a slice of all passed arguments.
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
function:
|
||||
action:
|
||||
aliases: [slice]
|
||||
returnType: any
|
||||
signatures: [collections.Slice ITEM...]
|
||||
relatedFunctions:
|
||||
related:
|
||||
- collections.Append
|
||||
- collections.Apply
|
||||
- collections.Delimit
|
||||
@@ -22,8 +18,6 @@ relatedFunctions:
|
||||
aliases: [/functions/slice]
|
||||
---
|
||||
|
||||
One use case is the concatenation of elements in combination with the [`delimit` function]:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "a" "b" "c" }}
|
||||
{{ $s }} → [a b c]
|
||||
|
Reference in New Issue
Block a user