diff options
| author | Peter Bacon Darwin | 2014-02-19 16:21:20 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-19 16:21:20 +0000 |
| commit | 3fbc25718eae6b7fc67f822755f68f8f53b1ef8a (patch) | |
| tree | bd313a1c43bc78a896cd2285f4f5af2d1d41a043 /docs/config/processors/pages-data.js | |
| parent | b488bbf4bfd6c73f2c0c22acda51322d0e69cc37 (diff) | |
| download | angular.js-3fbc25718eae6b7fc67f822755f68f8f53b1ef8a.tar.bz2 | |
chore(doc-gen): improve grouping and sorting of api nav items
Diffstat (limited to 'docs/config/processors/pages-data.js')
| -rw-r--r-- | docs/config/processors/pages-data.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/config/processors/pages-data.js b/docs/config/processors/pages-data.js index ff419423..43fdc9dd 100644 --- a/docs/config/processors/pages-data.js +++ b/docs/config/processors/pages-data.js @@ -56,8 +56,19 @@ var navGroupMappers = { delete docTypes.module; }) + .tap(function(docTypes) { + if ( docTypes.input ) { + docTypes.directive = docTypes.directive || []; + // Combine input docTypes into directive docTypes + docTypes.directive = docTypes.directive.concat(docTypes.input); + delete docTypes.input; + } + }) + .forEach(function(sectionPages, sectionName) { + sectionPages = _.sortBy(sectionPages, 'name'); + if ( sectionPages.length > 0 ) { // Push a navItem for this section navItems.push({ |
