From 89a7b884a7063b3dd603bdccc1466b1243e16911 Mon Sep 17 00:00:00 2001 From: Frieder Griesshammer Date: Sun, 27 Feb 2022 12:10:14 +0100 Subject: [PATCH] Do not create random ids based on current time --- layouts/shortcodes/random_image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/random_image.html b/layouts/shortcodes/random_image.html index 6c3d983..40b47de 100644 --- a/layouts/shortcodes/random_image.html +++ b/layouts/shortcodes/random_image.html @@ -3,7 +3,7 @@ {{- errorf "missing value for 'image.choices': %s" .Position }} {{- end }} {{- $alt := default "random image" ($.Page.Param "image.alt") }} -{{- $id := sha256 now.UnixNano }} +{{- $id := sha256 (index (seq 999 | shuffle) 0) }}