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