Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rhnvrm/bodhi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Verma <hello@rohanverma.net>2020-05-19 22:12:06 +0300
committerRohan Verma <hello@rohanverma.net>2020-05-19 22:23:01 +0300
commitb5a34bd70b13c6e85f7bce14bbf70192ea5f804f (patch)
treeb5370e825570f6e745c4287546e5fbea8e172575
parentd9050bbaad56bde1108bdfcbd7a914b4c509c642 (diff)
fix: sort issue in netlify
-rw-r--r--layouts/_default/list.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index ac2b212..6c8b1d0 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -14,8 +14,9 @@
{{ end }}
{{ end }}
- {{ range (.Paginate $pages).Pages.ByDate.Reverse }}
- {{ partial "list_preview" . }}
+ {{ $sorted := sort $pages "Params.date" "desc" }}
+ {{ range $post := (.Paginate $sorted).Pages }}
+ {{ partial "list_preview" $post }}
{{ end }}
{{ if len $pages }}