Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3fbc257

Browse files
chore(doc-gen): improve grouping and sorting of api nav items
1 parent b488bbf commit 3fbc257

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/config/processors/pages-data.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,19 @@ var navGroupMappers = {
5656
delete docTypes.module;
5757
})
5858

59+
.tap(function(docTypes) {
60+
if ( docTypes.input ) {
61+
docTypes.directive = docTypes.directive || [];
62+
// Combine input docTypes into directive docTypes
63+
docTypes.directive = docTypes.directive.concat(docTypes.input);
64+
delete docTypes.input;
65+
}
66+
})
67+
5968
.forEach(function(sectionPages, sectionName) {
6069

70+
sectionPages = _.sortBy(sectionPages, 'name');
71+
6172
if ( sectionPages.length > 0 ) {
6273
// Push a navItem for this section
6374
navItems.push({

0 commit comments

Comments
 (0)