Closed aappddeevv closed 3 years ago
@aappddeevv - When trailingSlash true is used, the sidebar links config also needs to include a trailing slash. For example:
"sidebar": {
"forcedNavOrder": [
"/introduction", // add trailing slash if enabled above
"/codeblock"
],
"collapsedNav": [
"/codeblock" // add trailing slash if enabled above
],
"links": [
{ "text": "Hasura", "link": "https://hasura.io"},
],
"frontline": false,
"ignoreIndex": true,
},
You would need to add slash to each URL. (/introduction/ , /codeblock/) etc. This was done to maintain backwards compatibility since it's a newly added feature.
It looks like the algorithm src/components/sidebar/tree.js:calculateTreeData fails to produce a properly sorted sidebar if
trailingSlash:true
is used in config.js.