Hey Loura!

In Hugo you can use {{index (seq 18 | shuffle) 0}}.

  • What this is doing is basically making a sequence, list, of numbers from 1-18 with seq 18
  • Mixing up the list by shuffling the elements with shuffle
  • Then grabbing the first element by it’s index of zero index (seq 18 | shuffle) 0

Originally mentioned in Dev Diary 0001 - Week of October 2nd 2023

Replies

Ripples

Nothing has rippled back yet.