Study Guide: How to generate a somewhat random value in Hugo
# time.Now generates something like: 2023-10-15 12:59:28.337140706 -0700 PDT m=+0.041752605
# Use time.Now to generate a somewhat random string and store it in the variable $seed.
{{ $seed := time.Now }}
# Hash the value in $seed and return its MD5 checksum encoded to a hexadecimal string.
# Then randomly shuffle the string and store the result in $id.
{{ $id := delimit (shuffle (split (md5 $seed) "" )) "" }}
Related Content
Source: //study/hugo/hugo-get-unique-id/
