sort subpages by title
This commit is contained in:
parent
8245b95130
commit
c02bced4fe
|
@ -7,6 +7,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
|
@ -36,6 +37,7 @@ func (m *metadata) getSubpages() []Subpage {
|
|||
ret = append(ret, subpage)
|
||||
}
|
||||
}
|
||||
sort.Slice(ret, func(i, j int) bool { return strings.ToUpper(ret[i].Title) < strings.ToUpper(ret[j].Title) })
|
||||
return ret
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user