mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00: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:
1 parent
89d079bcf0
commit
079a61ab10
1 file changed
+1
-1
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user