hugo-theme-relearn/layouts/partials/make-random-md5.hugo
2023-02-01 23:16:42 +01:00

8 lines
No EOL
227 B
Text

{{- $random := "" }}
{{- $set := split "012345abcdefghijklmnopqrstuvwxyz" "" }}
{{- range (seq 16) }}
{{- with ($set | shuffle | first 1) }}
{{- $random = printf "%s%s" $random . }}
{{- end }}
{{- end }}
{{- md5 $random }}