Files
hugo/content/functions/shuffle.md
T
Bjørn Erik Pedersen e4824eb3fe Fix the output shortcode and its usage
Passing the shortcode into the Markdown processor just to get pre and code tags does not make much sense.
2017-07-21 13:06:11 +02:00

879 B

title, description, godocref, date, publishdate, lastmod, categories, menu, signature, workson, hugoversion, relatedfuncs, deprecated, draft, aliases
title description godocref date publishdate lastmod categories menu signature workson hugoversion relatedfuncs deprecated draft aliases
shuffle Returns a random permutation of a given array or slice. 2017-02-01 2017-02-01 2017-04-30
functions
docs
parent
functions
shuffle COLLECTION
seq
false false

{{< code file="shuffle-input.html" >}}

{{ shuffle (seq 1 5) }}
{{ shuffle (slice "foo" "bar" "buzz") }}
{{< /code >}}

This example would return the following:

{{< output file="shuffle-output.html" >}}

2 5 3 1 4
buzz foo bar
{{< /output >}}

This example also makes use of the slice and seq functions.