{{- range first $count (sort . "views" "desc") }}
{{- $page := .page }}
{{- $img := "" }}
{{- with .page.Params.cover }}{{ with .image }}{{ $img = . }}{{ end }}{{ end }}
{{- if not $img }}{{ with .page.Params.images }}{{ $img = cond (reflect.IsSlice .) (index . 0) . }}{{ end }}{{ end }}
{{- $src := "" }}
{{- with $img }}
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") (hasPrefix . "/") }}{{ $src = . }}
{{- else }}{{ with $page.Resources.Get . }}{{ $src = .RelPermalink }}{{ end }}{{ end }}
{{- end }}
{{- with $src }}
{{ end -}}
{{ .page.LinkTitle }}
{{- if $args.views }}{{ lang.FormatNumber 0 .views }}{{ end -}}
{{- end }}