少于1分钟
将以下英文翻译为中文:
https://gohugo.io/functions/slice/
Creates a slice (array) of all passed arguments.
slice ITEM...
One use case is the concatenation of elements in combination with the delimit function:
delimit
slice.html
1 2 3 4
{{ $sliceOfStrings := slice "foo" "bar" "buzz" }} <!-- returns the slice [ "foo", "bar", "buzz"] --> {{ delimit ($sliceOfStrings) ", " }} <!-- returns the string "foo, bar, buzz" -->