remorses / dokz

Effortless documentation with Next.js and MDX
466 stars 40 forks source link

Collapsible menu in sidebar not respecting the sidebarOrdering #18

Closed jncampbell closed 4 years ago

jncampbell commented 4 years ago

My pages directory structure is represented like the following

+-- areas-of-interest
|   +--coding-conventions
|    | +--global.mdx
|    | +--javascript.mdx
|    | +--ruby.mdx
+-- code-reviews.mdx
+-- quality-assurance.mdx
+-- on-call.mdx

in my _app.tsx file I have the following for the sidebarOrdering

// _app.tsx

const sidebarOrder = {
  'index.md': true,
  'areas-of-interest': {
     'coding-conventions: {
         global: true,
         javascript: true,
         ruby: true,
     },
    'code-reviews': true,
    'quality-assurance' : true,
    'on-call': true,
  }
}

However, coding-conventions, which results in a collapsible menu, is always at the end of the list in the sidebar. I can change the order of the items within the collapsible menu, but I can't get the collapsible menu to show up first in the list.

Screen Shot 2020-07-04 at 12 22 49 AM

Is there any way to accomplish this?

remorses commented 4 years ago

Folders are always put last, it would be hard to see where a folder group ends if there are other side nav items below