JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
812 stars 478 forks source link

Enable dropdown possibility #609

Closed Datseris closed 11 months ago

Datseris commented 6 years ago

After talking with @ChrisRackauckas we feel like having a dropdown menu possibility that is not expanded by default will be very helpful, in avoiding overflooding the left column with the sections.

For example look here: https://juliadynamics.github.io/DynamicalSystems.jl/latest/ and here: http://docs.juliadiffeq.org/stable/index.html

The main sections of the documentation in the first example can be expanded into a drop-down menu, which tremendously increases clarity and flow of the documentation page.

Unfortunately I cannot help with sharing how I do it, since I simply use Material+MkDocs.

My mkdocs.yml has:

pages:
- Introduction: index.md
- System Definition:
  - General Remarks: definition/general.md
  - Continuous Systems: definition/continuous.md
  - Discrete Systems: definition/discrete.md
  - Time Evolution: definition/evolve.md
  - Numerical Data: definition/dataset.md
  - Predefined Systems: definition/predefined.md
- ChaosTools:
  - Features Overview: chaos/overview.md
  - Lyapunov Exponents: chaos/lyapunovs.md
  - Entropies and Dimensions: chaos/entropies.md
  - Nonlinear Timeseries Analysis: chaos/nlts.md
  - Periodicity: chaos/periodicity.md
  - Chaos Detection: chaos/chaos_detection.md
  - Visualization: chaos/visualization.md
- Contributor Guide: contributors_guide.md

which makes the dropdown automatically.

mortenpi commented 6 years ago

It is definitely something we could consider -- both DifferentialEquations and the Julia manual might benefit from it. They both use the native HTML output, so we would need to add some javascript magic into assets/html/documenter.js for this I think.

If the menu is always short enough, then it would partially work around #564 too.

Datseris commented 6 years ago

True. I think everybody could benefit from it, even if they don't have excessively large documentation. Tidiness is a virtue!

carstenbauer commented 6 years ago

I would really like to see this! Any estimate on if/when this will happen?

odow commented 11 months ago

Closing because I think this is resolved. The navigation bar on the left is now drop-down on click (not hover), and you can control the initial level of display.

If I mis-understood please comment and I will reopen.