mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
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")
This commit is contained in:
parent
89d079bcf0
commit
079a61ab10
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue