mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
6eff9e5015
commit
38d034df38
1 changed files with 13 additions and 1 deletions
|
@ -97,6 +97,18 @@ One use case is the concatenation of elements in combination with `delimit`:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### shuffle
|
||||||
|
|
||||||
|
`shuffle` returns a random permutation of a given array or slice, e.g.
|
||||||
|
|
||||||
|
```html
|
||||||
|
{{ shuffle (seq 1 5) }}
|
||||||
|
<!-- returns [2 5 3 1 4] -->
|
||||||
|
|
||||||
|
{{ shuffle (slice "foo" "bar" "buzz") }}
|
||||||
|
<!-- returns [buzz foo bar] -->
|
||||||
|
```
|
||||||
|
|
||||||
### echoParam
|
### echoParam
|
||||||
Prints a parameter if it is set.
|
Prints a parameter if it is set.
|
||||||
|
|
||||||
|
@ -128,7 +140,7 @@ Encodes a given object to JSON.
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
{{ dict "title" .Title "content" .Plain | jsonify }}
|
{{ dict "title" .Title "content" .Plain | jsonify }}
|
||||||
|
|
||||||
### last
|
### last
|
||||||
Slices an array to only the last _N_ elements.
|
Slices an array to only the last _N_ elements.
|
||||||
|
|
Loading…
Reference in a new issue