How to select keys from a Dict?

Thank you, that solved my problem.

Finally i’ve got what i wanted using the code below.

{{ $keys := slice }}
{{ $cov := .Site.Data.cover }}
{{ range $key, $val := $cov }}{{ $keys = $keys | append $key }}{{ end }}
{{ $cover := .Params.pageCover | default (index $cov (index $keys (index (shuffle (seq 0 (sub (len $keys) 1)) ) 0))) }}
{{ with $cover }}
<section id="cover-page" style="background: #222 url('{{ $baseUrl }}/img/fullscreen/{{ .img }}') no-repeat top center;">
{{ end }}

The actual code is slightly more complicated because the post might decide to define the cover image that should be visible on the top of the page. But for all pages that are indecisive this made my day.

While still under massive change you might have look at my first Hugo-made website:

http://www.reswi.de/avd/

There is still work to be done but i’m slowly getting there.