FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.79k stars 5.36k forks source link

mdbook-forc-documenter needs a more sophisticated way of handling nested sections #2452

Closed kayagokalp closed 2 years ago

kayagokalp commented 2 years ago

With #2440, we needed to document with the following structure:

...
- 11.4. Plugins
  - 11.4.1 forc client
    - 11.4.1.1 forc deploy
    - 11.4.1.2 forc run
  - 11.4.2 forc explore

But mdbook-forc-documenter does not support this kind of nesting. Related to https://github.com/FuelLabs/sway/pull/2440#discussion_r936602561 and https://github.com/FuelLabs/sway/pull/2440#discussion_r936745062

I introduced some intermediate implementations to create the structure above at that PR but it only supports a single level of nesting. We may need to have a graph-like structure to hold this nesting information.

mitchmindtree commented 2 years ago

I think the intermediate implementations are close enough but could just use a little tweaking for readability - see this comment.

kayagokalp commented 2 years ago

I don't think this should be necessary, I'm happy for us to draw the line at one level of nesting. I think all we're after is a way for a single plugin crate to support more than one command.

I think this is completed/not-planned as the linked comment is addressed and further enhancements are not needed. Feel free to re-open it otherwise. Closed by #2440 as a side effect