docfy icon indicating copy to clipboard operation
docfy copied to clipboard

Support ordering folders / Custom TOC

Open josemarluedke opened this issue 5 years ago • 5 comments

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.

josemarluedke avatar Oct 20 '20 00:10 josemarluedke

cc/ @knownasilya.

josemarluedke avatar Oct 20 '20 00:10 josemarluedke

I only have folders at the top level, how do I order those?

NullVoxPopuli avatar Jan 14 '21 18:01 NullVoxPopuli

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

NullVoxPopuli avatar Jan 14 '21 19:01 NullVoxPopuli

Nice workaround

knownasilya avatar Jan 14 '21 19:01 knownasilya

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

ZoeBijl avatar Nov 22 '21 20:11 ZoeBijl