From 079a61ab108d82c5bddbcf1c3a4a379d9bc87b7b Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 26 May 2021 23:09:50 +0100 Subject: [PATCH] fix: 404 "latest" order when some pages contain weights Prevent Hugo ordering weighted pages higher in the "latest" content list. Also include course/docs index pages (Hugo "sections") and remove private pages (although Hugo render option is preferred equiv to "private:true") --- wowchemy/layouts/404.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wowchemy/layouts/404.html b/wowchemy/layouts/404.html index 3b2ae6e4..9373fd1e 100644 --- a/wowchemy/layouts/404.html +++ b/wowchemy/layouts/404.html @@ -15,7 +15,7 @@

{{ i18n "404_recommendations" }}

- {{ $query := site.RegularPages }} + {{ $query := where (where (where site.Pages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "home" "page" "section")) "Params.private" "!=" true }} {{ $count := len $query }} {{ if gt $count 0 }}

{{ i18n "user_profile_latest" }}