The structure of my website is like this
blog
├── funny-cats
│ └── kittens
│ | └── _index.md
│ └──katten
└── _index.md
├── funny-dogs
│ └── dogs
│ | └── _index.md
│ └──honden
└── _index.md
I want to sort the subsections in every Home sections. The version I list below only list the subsections but not also sort them. Anybody has similar requirement before? Thanks.
{{ $sectionname := .Title}}
{{ range .Sections }}
<li>
<h5>{{ .Title }}</h5>
{{ range first $.Site.Params.lenPagesInSectionList .Pages }}
<a href="{{.RelPermalink}}">{{.Title}}</a>
{{ end }}
{{ if gt (len .Pages) $.Site.Params.lenPagesInSectionList }}
<a href="/">Read More <span class="glyphicon glyphicon-share-alt"></span></a>
{{ end }}
{{end}}
</li>
{{end}}
How should I add sorting in {{ range .Sections }}
?