I’m trying to figure out how to sort blog posts only on my index page
I can sort using
{{ range .Data.Pages.ByDate.Reverse }} {{.Title}}</br> {{ end }}
and I can restrict to just posts using
{{ range where .Data.Pages "Section" "post" }} {{.Title}}</br> {{ end }}
I need to combine them so I only include posts in reversed order (Most recent first), I guess i could use an inner if test but if I can achieve with a single function, it would be preferable.
If you have posts where only few have publishdates, then neither {{ range .Data.Pages.ByDate }} nor {{ range .Data.Pages.ByPublishDate }} do the right thing.