Support ordering folders / Custom TOC
Currently, the order of the NestedPageMetadata (where we allow to build navigation) uses the order property from frontmatter to order the pages. However, to order thechildren (a group of subsequent pages), we only do an alphabetical order, so there is no way to custom order that. We should add a way to custom order these sections.
cc/ @knownasilya.
I only have folders at the top level, how do I order those?
so far, when using auto for urlSchema, I'm placing a number in front of the folder name, and then I made a helper to remove the number prefix from the DocfyOutput node's name.
so,
1-first
2-second
3-third
is shown as
First
Second
Third
in my sidebar
Nice workaround
Would it be possible to sort pages alphabetically when using the flat output?
Example file tree:
packages/ -- table/docs/index.md -- toolbar/docs/index.md -- atoms/buttons/docs/index.md -- atoms/table-cell/docs/index.md
Right now you’d get this as an ouline:
- table
- toolbar
- buttons
- table-cell
Where I think this would make more sense:
- buttons
- table
- table-cell
- toolbar