Array in hugo template?

Can I write an array literal in a hugo template?

For example, I’m trying to do something like this: {{ ["a", "b"] | shuffle }}

Have a look at the slice template function.

1 Like

Thanks! figured it out: {{ slice "a" "b" | shuffle }}