From 665b1eb5e78a980c0deaf001c74fdd1dd5c93153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 13 Feb 2018 15:25:42 +0100 Subject: [PATCH] showcase: Shuffle the news items To give them all some time in the spotlight. --- .../layouts/partials/home-page-sections/showcase.html | 2 +- themes/gohugoioTheme/layouts/showcase/list.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html index 337fd2fc8..ede4c8b9a 100644 --- a/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html +++ b/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html @@ -4,7 +4,7 @@
- {{ range $p := first 10 (where .Site.RegularPages "Section" "showcase") }} + {{ range $p := first 10 (where .Site.RegularPages "Section" "showcase" | shuffle) }} {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} {{ with $img }} {{ $big := .Fill "1024x512 top" }} diff --git a/themes/gohugoioTheme/layouts/showcase/list.html b/themes/gohugoioTheme/layouts/showcase/list.html index 89565f342..b0083fc0f 100644 --- a/themes/gohugoioTheme/layouts/showcase/list.html +++ b/themes/gohugoioTheme/layouts/showcase/list.html @@ -9,7 +9,7 @@
- {{ range (.Paginator 20).Pages }} + {{ range (.Paginate (.Pages | shuffle ) 20).Pages }} {{template "showcase_items" .}} {{ end }}