bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Support for deeper submenu items level in ToC #37

Closed khos2ow closed 3 years ago

khos2ow commented 4 years ago

Currently the maximum supported depth for rendering ToC is 2 (basically h1 and h2). I was about to enhance this and send a PR but decided to start the discussion first.

Any thoughts, comments or suggestions on the matter?

bep commented 4 years ago

was this intentional?

2 seemed like a fine number, but it could certainly be made configurable...

khos2ow commented 4 years ago

So would you like this to be configurable or just increased (to for example 3 or 4 or ..)?

bep commented 4 years ago

So would you like this to be configurable or just increased (to for example 3 or 4 or ..)?

It needs to be configurable and default 2. I picked 2 because I like ... 2, and I want to keep it.

bep commented 4 years ago

I take that back. I guess we could increase it to 3 or 4 by default without it starting to look odd.

khos2ow commented 4 years ago

I did a very ugly quick hack and 3 seems to be doable, fast. I'll try to come up with a PR to potentially support up to 4 and may be even configurable. But to me 4 levels deep in the menu looks like a little bit too deep and may be rearranging from the API owner would be more logical than the theme supporting it.

zyxep commented 3 years ago

What is the status on this one?

I know Slate has this, https://github.com/slatedocs/slate/wiki/Deeper-Nesting which should make it possible. My end goal is to have this structure:

- APIS
- - api1
- - - docs for api1
- - - docs for api1
- - - docs for api1
- - api2
- - - docs for api2
- - - docs for api2
- - - docs for api2
- - api3
- - - docs for api3
- - - docs for api3
- - - docs for api3
khos2ow commented 3 years ago

We actually ended up settling on two level deep menu and restructured our content instead, but I should be able to revive the work I had started for this if there's an interest for it.

zyxep commented 3 years ago

It would be nice :)

I think my Product Designer would love to keep the old menu structure we currently have.

khos2ow commented 3 years ago

I submitted a PR which should be a good starting point IMO. As it stands it cannot be merged yet (I've described it in #63), but essentially one particular css rule is missing.