File tree 2 files changed +11
-4
lines changed
scripts/apidocgen/postprocess 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 325
325
"path" : " ./api/index.md" ,
326
326
"icon_path" : " ./images/icons/api.svg" ,
327
327
"children" : [
328
+ {
329
+ "title" : " General" ,
330
+ "path" : " ./api/general.md"
331
+ },
328
332
{
329
333
"title" : " Agents" ,
330
334
"path" : " ./api/agents.md"
357
361
"title" : " Files" ,
358
362
"path" : " ./api/files.md"
359
363
},
360
- {
361
- "title" : " General" ,
362
- "path" : " ./api/general.md"
363
- },
364
364
{
365
365
"title" : " Members" ,
366
366
"path" : " ./api/members.md"
Original file line number Diff line number Diff line change @@ -134,7 +134,14 @@ func writeDocs(sections [][]byte) error {
134
134
}
135
135
136
136
// Sort API pages
137
+ // The "General" section is expected to be always first.
137
138
sort .Slice (mdFiles , func (i , j int ) bool {
139
+ if mdFiles [i ].title == "General" {
140
+ return true // "General" < ... - sorted
141
+ }
142
+ if mdFiles [j ].title == "General" {
143
+ return false // ... < "General" - not sorted
144
+ }
138
145
return sort .StringsAreSorted ([]string {mdFiles [i ].title , mdFiles [j ].title })
139
146
})
140
147
You can’t perform that action at this time.
0 commit comments