HUGO
Menu
GitHub 87548 stars Mastodon

Hugo collections.Slice

Hugo Returns a slice created from the given values.

Syntax

collections.Slice [VALUE...]

Returns

[]any

Alias

slice
{{ $s := slice "a" "b" "c" }}
{{ $s }} → [a b c]

To create an empty slice:

{{ $s := slice }}

Last updated: January 1, 0001
Improve this page