fix(content-docs): always sort autogenerated sidebar items by file/folder name by default (#6700)

This commit is contained in:
Joshua Chen 2022-03-03 19:39:54 +08:00 committed by GitHub
parent f04cb7abb9
commit c90d25ca2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 66 deletions

View file

@ -6,8 +6,8 @@ Object {
Object {
"id": "doc with space",
"next": Object {
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
"permalink": "/docs/foo/bar",
"title": "Bar",
},
"prev": undefined,
},
@ -19,8 +19,8 @@ Object {
Object {
"id": "foo/baz",
"next": Object {
"permalink": "/docs/absoluteSlug",
"title": "absoluteSlug",
"permalink": "/docs/headingAsTitle",
"title": "My heading as title",
},
"prev": Object {
"permalink": "/docs/foo/bar",
@ -34,8 +34,8 @@ Object {
"title": "Hello sidebar_label",
},
"prev": Object {
"permalink": "/docs/doc with space",
"title": "Hoo hoo, if this path tricks you...",
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
},
},
Object {
@ -122,8 +122,8 @@ Object {
"title": "relativeSlug",
},
"prev": Object {
"permalink": "/docs/foo/bazSlug.html",
"title": "baz pagination_label",
"permalink": "/docs/rootTryToEscapeSlug",
"title": "rootTryToEscapeSlug",
},
},
Object {
@ -163,6 +163,23 @@ Object {
"id": "doc with space",
"type": "doc",
},
Object {
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"id": "foo/bar",
"type": "doc",
},
Object {
"id": "foo/baz",
"type": "doc",
},
],
"label": "foo",
"link": undefined,
"type": "category",
},
Object {
"id": "headingAsTitle",
"type": "doc",
@ -196,23 +213,6 @@ Object {
"id": "rootTryToEscapeSlug",
"type": "doc",
},
Object {
"collapsed": false,
"collapsible": true,
"items": Array [
Object {
"id": "foo/bar",
"type": "doc",
},
Object {
"id": "foo/baz",
"type": "doc",
},
],
"label": "foo",
"link": undefined,
"type": "category",
},
Object {
"collapsed": false,
"collapsible": true,