Skip to content

Commit c6c83fc

Browse files
committed
Respect sidebar_position in sidebar ordering
Closes #163 The custom logic we use to order the Docusuarus-generated sidebar does not respect the `sidebar_position` frontmatter field. To fix this, retrieve the `sidebar_position` value from docs page sidebar entries. For a sidebar category, retrieve the category index page and use its `sidebar_position`. The ordering logic now works like this: - Insert items with a predefined sidebar position at the required indices within the final sidebar item array. - Insert the remaining sidebar items into the empty slots in the final array. Order these items in the usual order, sorting alphabetically by title (or category label) and placing items with "Introduction" and "Get(ting)? Started" before alphabetized items.
1 parent 3055d94 commit c6c83fc

File tree

2 files changed

+1035
-458
lines changed

2 files changed

+1035
-458
lines changed

0 commit comments

Comments
 (0)