mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: collections.Slice
|
||||
description: Creates a slice of all passed arguments.
|
||||
description: Returns a slice composed of the given values.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
@@ -8,7 +8,7 @@ action:
|
||||
related:
|
||||
- functions/collections/Dictionary
|
||||
returnType: any
|
||||
signatures: [collections.Slice ITEM...]
|
||||
signatures: ['collections.Slice [VALUE...]']
|
||||
aliases: [/functions/slice]
|
||||
---
|
||||
|
||||
@@ -16,3 +16,9 @@ aliases: [/functions/slice]
|
||||
{{ $s := slice "a" "b" "c" }}
|
||||
{{ $s }} → [a b c]
|
||||
```
|
||||
|
||||
To create an empty slice:
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice }}
|
||||
```
|
||||
|
Reference in New Issue
Block a user