Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08f1f26

Browse files
committed
Merge branch 'main' into 3522-validation
2 parents cbacf76 + d9436fa commit 08f1f26

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

docs/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@
325325
"path": "./api/index.md",
326326
"icon_path": "./images/icons/api.svg",
327327
"children": [
328+
{
329+
"title": "General",
330+
"path": "./api/general.md"
331+
},
328332
{
329333
"title": "Agents",
330334
"path": "./api/agents.md"
@@ -357,10 +361,6 @@
357361
"title": "Files",
358362
"path": "./api/files.md"
359363
},
360-
{
361-
"title": "General",
362-
"path": "./api/general.md"
363-
},
364364
{
365365
"title": "Members",
366366
"path": "./api/members.md"

scripts/apidocgen/postprocess/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,14 @@ func writeDocs(sections [][]byte) error {
134134
}
135135

136136
// Sort API pages
137+
// The "General" section is expected to be always first.
137138
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+
}
138145
return sort.StringsAreSorted([]string{mdFiles[i].title, mdFiles[j].title})
139146
})
140147

0 commit comments

Comments
 (0)