sort subpages by title

This commit is contained in:
gutmet 2023-05-03 19:05:44 +02:00
parent 8245b95130
commit c02bced4fe

View File

@ -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
}