mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Merge commit 'e509cac533600cf4fa8382c9cdab78ddd82db688'
This commit is contained in:
28
docs/content/en/functions/collections/Shuffle.md
Normal file
28
docs/content/en/functions/collections/Shuffle.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: collections.Shuffle
|
||||
linkTitle: shuffle
|
||||
description: Returns a random permutation of a given array or slice.
|
||||
keywords: [ordering]
|
||||
categories: [functions]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
function:
|
||||
aliases: [shuffle]
|
||||
returnType: any
|
||||
signatures: [collections.Shuffle COLLECTION]
|
||||
relatedFunctions:
|
||||
- collections.Reverse
|
||||
- collections.Shuffle
|
||||
- collections.Sort
|
||||
- collections.Uniq
|
||||
aliases: [/functions/shuffle]
|
||||
---
|
||||
|
||||
```go-html-template
|
||||
{{ shuffle (seq 1 2 3) }} → [3 1 2]
|
||||
{{ shuffle (slice "a" "b" "c") }} → [b a c]
|
||||
```
|
||||
|
||||
The result will vary from one build to the next.
|
Reference in New Issue
Block a user