Skip to content

Commit

Permalink
🪲 (cli) Menu bar sorted in Docute mode (#53)
Browse files Browse the repository at this point in the history
Menu bar sorted when running in Docute mode
  • Loading branch information
roxburghm authored and HcySunYang committed Mar 21, 2019
1 parent f37ef60 commit a38320c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cli/lib/templates/docute/sao.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ module.exports = options => {
groups.sort((a, b) => {
if (a.title === '') return -1
if (b.title === '') return 1
return a.name > b.name ? 1 : -1
return a.title > b.title ? 1 : -1
})
groups.forEach(group => {
group.links.sort((a, b) => {
if (a.title < b.title) return -1
if (a.title > b.title) return 1
return 0;
})
})
const config = {
data(answers) {
Expand Down

0 comments on commit a38320c

Please sign in to comment.