Bläddra i källkod

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")
George Cushen 3 år sedan
förälder
incheckning
079a61ab10
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      wowchemy/layouts/404.html

+ 1 - 1
wowchemy/layouts/404.html

@@ -15,7 +15,7 @@
 
   <p>{{ i18n "404_recommendations" }}</p>
 
-  {{ $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 }}
   <h2>{{ i18n "user_profile_latest" }}</h2>