fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
462 stars 155 forks source link

Nesting Document Categories #927

Open 1eyewonder opened 3 days ago

1eyewonder commented 3 days ago

Feature Request

I've been using this tool a lot more as of late, and I was curious if the discussion of nesting categories has ever come about.

Using the example structure below

Collections
| -- Overview
| -- Destructuring with Cons
| -- Pattern Matching Lists
| -- Pattern Matching Arrays

I think it would be nice to be able to create nested/subcategories like so.

Collections
| -- Overview
| -- Arrays
    | -- Pattern Matching
| -- Lists
    | -- Destructuring with Cons
    | -- Pattern Matching

My initial thoughts are we could potentially do this one of two ways (I'm sure there are better ideas as well).

  1. Special Character Parsing We could add some sort of character sequence which would be parsable for category so we know how to nest the folder appropriately.
---
category: Collections -> Lists
---
  1. Additional Metadata We could add an additional tag such as parentCategory which tells us how to nest the folder appropriately.
---
category: Lists
parentCategory: Collections
---

Notes

nojaf commented 2 days ago

Hi there,

I have some faint memories of this being requested by someone somewhere. I don't think I mind this feature but the implementation could be tricky. Things like the {{fsdocs-next-page-link}} become more complex. Navigation menus should also be taken into account.

I suppose we do want to be flexible and allow multiple levels of categories. Not sure yet on the end-user experience.