mirror of
https://github.com/caddyserver/website.git
synced 2025-04-22 21:16:15 -04:00
sort submodules lists (#434)
This commit is contained in:
parent
4b5588237e
commit
e4fcafc0b6
1 changed files with 7 additions and 0 deletions
|
@ -342,6 +342,13 @@ function makeSubmoduleList(module, path, value) {
|
|||
}
|
||||
var submodList = '<ul>';
|
||||
if (module.namespaces && module.namespaces[value.module_namespace]) {
|
||||
module.namespaces[value.module_namespace].sort(function(a, b){
|
||||
if(isStandard(a.package) && !isStandard(b.package)) return -1;
|
||||
if(!isStandard(a.package) && isStandard(b.package)) return 1;
|
||||
if(a.name < b.name) return -1;
|
||||
if(a.name > b.name) return 1;
|
||||
return 0;
|
||||
});
|
||||
for (var j = 0; j < module.namespaces[value.module_namespace].length; j++) {
|
||||
var submod = module.namespaces[value.module_namespace][j];
|
||||
var href = canTraverse(module) ? '.'+path+'/'+submod.name+'/' : './'+value.module_namespace+'.'+submod.name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue