Dynamic Random Sort List

Dear All

Is there a way to make list sorted randomly?
So everytime visitor refresh or revisit my list,
all posts are changed and sorted randomly?


Hugo generates a page upon build. You can do somehow random list but it will refresh only on the next build.

You can go outside Hugo scope (static generator) and implement some JS to do this probably.

1 Like

As @idarek said, you’ll need JavaScript for this. Hugo only generates static content. Hugo does though sort content through the shuffle function, but you will have to build and push the site every time you need to refresh the content.