I believe it can be done even with bash script and fastcgi, was just interested if it is somehow possible via caddy templates.
I think the problem is that .Files should be shuffled before ranging over them.
But as i understand there are no options to define a function that could solve this via template file.
Creating and uploading a lot of videos from gopro to youtube mixing audio from list of mp3 files, want background music in a random order for different videos.
As long as i understand it’s imposible to import go packages from template or add functions to FuncMap.
Not sure should this be added as feature request, but it looks like if it could be achieved this could add some interesting stuff to templates.
Can’t find other reasons why “generic” shuffle should be there.
If there could be an option to extend FuncMap - that could be interesting.
But it looks like this is quite narrow niche, who would ever want to extend go templates functions?